๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/Javascript

ES6 Syntax

by 1mj 2022. 5. 3.

๋ชฉ์ฐจ

 

1. Restructuring(๊ตฌ์กฐ ๋ถ„ํ•ด ํ• ๋‹น)

๋ฐฐ์—ด์ด๋‚˜ ๊ฐ์ฒด์˜ ์†์„ฑ์„ ํ•ด์ฒดํ•˜์—ฌ ๊ทธ ๊ฐ’์„ ๊ฐœ๋ณ„ ๋ณ€์ˆ˜์— ๋‹ด์„ ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋Š” ํ‘œํ˜„์‹

1-1. ๊ฐ์ฒด

โœ” ๊ตฌ๋ฌธ

ES5 ์—์„œ๋Š” ๊ฐ ๋ณ€์ˆ˜์— ๊ฐ’์„ ํ• ๋‹นํ•ด์•ผ ํ–ˆ๋‹ค.

var info = {
  myName: 'Anna',
  myAge: 10
};

var myName = info.myName;
var myAge = info.myAge;

console.log(myName, myAge);	// Anna 10

 

ES6 ์—์„œ๋Š” ์ค‘๊ด„ํ˜ธ ์•ˆ์— ๋„ฃ์–ด ํ•˜๋‚˜๋กœ ๋ฌถ์–ด์„œ ๊ฐ์ฒด์˜ ์†์„ฑ์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋‹ค.

const info = {
  myName: 'Anna',
  myAge: 10
};

let {myName, myAge} = info;
console.log(myName, myAge);	// Anna 10

 

โœ” ์†์„ฑ๋ช…๊ณผ ๋ณ€์ˆ˜๋ช…

์†์„ฑ ์ด๋ฆ„๊ณผ ๋ณ€์ˆ˜ ์ด๋ฆ„์„ ๋™์ผํ•˜๊ฒŒ ์ง€์ •ํ•ด์•ผ ํ•˜๋ฉฐ ๋ณ€์ˆ˜ ์ด๋ฆ„์„ ๋ฐ”๊พธ๋ ค๋ฉด ์ฝœ๋ก (:)์„ ์‚ฌ์šฉํ•œ๋‹ค.

์†์„ฑ ์ด๋ฆ„๊ณผ ๋‹ค๋ฅธ ๋ณ€์ˆ˜ ์ด๋ฆ„์„ ์‚ฌ์šฉํ•˜๋ฉด undefined ๊ฐ€ ํ• ๋‹น๋œ๋‹ค.

const info = {
  myName: 'Anna',
  myAge: 10
};

let {myName: otherName, myAge, myHobby} = info;

console.log(myHobby);	// undefined
console.log(otherName, myAge);	// Anna 10
console.log(myName);	// Uncaught ReferenceError: myName is not defined

 

โœ” ๊ฐ์ฒด ๊ตฌ์กฐ ๋ถ„ํ•ด ํ™œ์šฉ

- ๊ฐ์ฒด ํ‚ค, ๊ฐ’ ์ „์ฒด ์ถœ๋ ฅํ•˜๊ธฐ

Object.entries() ๋ฉ”์†Œ๋“œ๋Š” ์ˆœ์„œ๋กœ ์ด๋ฃจ์–ด์ง„ ๊ฐ์ฒด์˜ ์†์„ฑ [key, value] ์Œ ๋ฐฐ์—ด์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

const user = {
  userName: 'jane',
  userAge: 20
}

for (let [key, val] of Object.entries(user)) {
  console.log(key, val);
  // userName jane
  // userAge 20
}

 

- ๊ฐ์ฒด ๋ฐฐ์—ด ์ „์ฒด ์ถœ๋ ฅํ•˜๊ธฐ

const userList = [{
  userName: 'jane',
  userAge: 20
},{
  userName: 'anna',
  userAge: 19
}];

const printUser = arr => {
  for (let {userName: n, userAge: a} of arr) {
  	console.log(n, a)
  }
};

printUser(userList);
// jane 20
// anna 19

 

1-2. ๋ฐฐ์—ด

โœ” ๊ตฌ๋ฌธ

ES5 ์—์„œ๋Š” ์ธ๋ฑ์Šค๋กœ ๋ฐฐ์—ด์— ์ ‘๊ทผํ•˜์—ฌ ์š”์†Œ๋ฅผ ๊ฐ ๋ณ€์ˆ˜์— ํ• ๋‹นํ•œ๋‹ค.

const numbers = [1, 2, 3];

let one = numbers[0];
let tow = numbers[1];
let three = numbers[2];

console.log(one, two, three);	// 1 2 3

 

ES6 ๋Š” ๊ฐ์ฒด์™€ ๋™์ผํ•œ ๊ตฌ๋ฌธ์„ ์‚ฌ์šฉํ•˜์ง€๋งŒ ์ค‘๊ด„ํ˜ธ({}) ๋Œ€์‹  ๋Œ€๊ด„ํ˜ธ([])๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ•˜๋‚˜๋กœ ๋ฌถ์–ด์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

const numbers = [1, 2, 3];

let [one, two, three] = numbers;

console.log(one, two, three);	// 1 2 3

 

โœ” ๊ธฐ๋ณธ ๊ฐ’

๋ถ„ํ•ดํ•˜์—ฌ ๋ณ€์ˆ˜์— ํ• ๋‹น๋œ ๊ฐ’์ด undefined ์ผ ๋•Œ ๋ณ€์ˆ˜์— ์„ค์ •๋œ ๊ธฐ๋ณธ ๊ฐ’์„ ์‚ฌ์šฉ(ํ• ๋‹น)ํ•œ๋‹ค.

let [x=1, y=2] = [];
console.log(x, y);	// 1 2

let [x=1, y=2] = [3];
console.log(x, y);	// 3 2

let [x=1, y=2] = [3, 4];
console.log(x, y);	// 3 4

 

โœ” ๋ถ„ํ•ดํ•˜๊ณ  ๋‚จ์€ ๋ถ€๋ถ„ ํ•˜๋‚˜์˜ ๋ณ€์ˆ˜์— ํ• ๋‹นํ•˜๊ธฐ(rest ๊ตฌ๋ฌธ)

const numbers = [0, 1, 2, 3];

let [zero, ...rest] = numbers;

console.log(zero);	// 0
console.log(rest);	// [1, 2, 3]

 


2. Spread Operator(์ „๊ฐœ ๊ตฌ๋ฌธ)

Spread Operator ๋Š” ... ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ๊ฐ์ฒด ๋˜๋Š” ๋ฐฐ์—ด์˜ ๊ฐ’์„ ๋ณ‘ํ•ฉํ•˜๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ๊ฐ์ฒด, ๋ฐฐ์—ด๋กœ ๋ณต์‚ฌํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ๋ฐฐ์—ด์—์„œ์˜ Spread Operator
  • ๊ฐ์ฒด์—์„œ์˜ Spread Operator
  • ํ•จ์ˆ˜์—์„œ์˜ Spread Operator

 

โœ” ๊ตฌ๋ฌธ

๋ฐฐ์—ด์˜ ์—˜๋ฆฌ๋จผํŠธ๋ฅผ ํ•จ์ˆ˜์˜ ์ธ์ž๋กœ ์‚ฌ์šฉํ•˜๊ณ ์ž ํ•  ๋•Œ apply()๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ์ด๋ฅผ ํŽผ์นจ ์—ฐ์‚ฐ์ž(...)๋กœ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด, Math.max() ์˜ argument ์—๋Š” ์ˆซ์ž๋งŒ ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐฐ์—ด์„ ๋„ฃ๊ณ  ์‹ถ์„ ๋•Œ๋Š” apply() ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

Math.max(1, 3, 4, 2, 9);	// 9

let arr = [1, 3, 4, 2, 9];
Math.max(arr) ;		// NaN
Math.max.apply(null, arr);	// 9

 

ํŽผ์นจ ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ธ์ž๋ฅผ ๋ฐ›๋Š” ํ•จ์ˆ˜์˜ ํ˜ธ์ถœ ์ธ์ž๋กœ ๋ฐฐ์—ด ์š”์†Œ๋ฅผ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๋‹ค.

function add(x, y) {
  return x + y;
}

const numbers = [3, 5];

console.log(add.apply(null, numbers));	// 6
console.log(add(...numbers));	// 6

 

โœ” ๋ฐฐ์—ด

์ด๋ฏธ ์กด์žฌํ•˜๋Š” ๋ฐฐ์—ด์— ์ผ๋ถ€๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์„ ์ƒ์„ฑํ•˜๊ฑฐ๋‚˜ push(), splice(), concat() ๋“ฑ์˜ ์กฐํ•ฉ์„ ๋Œ€์‹ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

- ๋ฐฐ์—ด ๋ณ‘ํ•ฉ

concat() ์œผ๋กœ ๋ฐฐ์—ด ๋‘ ๊ฐœ๋ฅผ ์—ฐ๊ฒฐํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์— ๋‹ด๋Š” ๊ธฐ์กด ๋ฐฉ์‹์ด๋‹ค.

var arr1 = [1, 2, 3]; 
var arr2 = [4, 5, 6]; 

let arr = arr1.concat(arr2); 
console.log(arr);	// [1, 2, 3, 4, 5, 6]

 

์ด๋ฅผ Spread Operator๋กœ ๋ฐ”๊พธ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ... ์—ฐ์‚ฐ์ž๋กœ ๋‘ ๋ฐฐ์—ด์„ ์‰ฝ๊ฒŒ ๋ณ‘ํ•ฉํ•  ์ˆ˜ ์žˆ๋‹ค.

const arr1 = [1, 2, 3]; 
const arr2 = [4, 5, 6]; 

let arr = [...arr1, ...arr2]; 
console.log(arr);	// [1, 2, 3, 4, 5, 6]

 

- ๋ฐฐ์—ด ๋ณต์‚ฌ

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—์„œ ๋ฐฐ์—ด์„ ์ƒˆ๋กœ์šด ๋ณ€์ˆ˜์— ๋‹จ์ˆœ ํ• ๋‹นํ•˜๋ฉด ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์€ ๊ธฐ์กด ๋ฐฐ์—ด์„ ์ฐธ์กฐํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์„ ๋ณ€๊ฒฝํ•˜๋”๋ผ๋„ ์›๋ณธ ๋ฐฐ์—ด๊นŒ์ง€ ๋ณ€๊ฒฝ๋œ๋‹ค.

var arr1 = [1, 2, 3]; 
var arr2 = arr1; 

arr2.push(4); 
console.log(arr1);	// [1, 2, 3, 4]
console.log(arr2);	// [1, 2, 3, 4]


// ๋˜๋Š” ๊ฐ ์š”์†Œ์— ์ ‘๊ทผํ•˜์—ฌ ๋ณต์‚ฌ
var arr1 = [1, 2, 3]; 
var arr2 = [arr1[0], arr1[1], arr1[2]];

 

ES6์—์„œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋ณต์‚ฌ๋œ ๋ฐฐ์—ด์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. (๋ฐฐ์—ด ์•ˆ์— ๊ฐ์ฒด๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ ๋ณต์‚ฌ๋œ ๋ฐฐ์—ด์˜ ๊ฐ์ฒด๋Š” ์›๋ณธ ๊ฐ’์„ ์ฐธ์กฐํ•œ๋‹ค. = ์–•์€ ๋ณต์ œ)

let arr1 = [1, 2, 3]; 
let arr2 = [...arr1]; 

arr2.push(4); 
console.log(arr1);	// [1, 2, 3]
console.log(arr2);	// [1, 2, 3, 4]

 

๊ทธ๋ฆฌ๊ณ  ๋ฐฐ์—ด์— ์š”์†Œ๋ฅผ ๋ง๋ถ™์—ฌ ๋ณต์‚ฌํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

let arr1 = [1, 2, 3];
let arr2 = [0, ...arr1, 4, 5];

console.log(arr1);	// [1, 2, 3]
console.log(arr2);	// [0, 1, 2, 3, 4, 5]

 

โœ” ๊ฐ์ฒด

- ๊ฐ์ฒด ๋ณ‘ํ•ฉ

let obj1 = {id: 'tom', name: '์•ˆ๋‚˜'};
let obj2 = {id: 'angela', age: 17};

let mergedObj = {...obj1, ...obj2};
console.log(mergedObj);	// {id: 'angela', name: '์•ˆ๋‚˜', age: 17}

 

- ๊ฐ์ฒด ๋ณต์‚ฌ

let obj1 = {x: 1, y: 3};
let obj2 = {...obj1};
let obj3 = {...obj1, z: 7};

console.log(obj2);	// {x: 1, y: 3}
console.log(obj3);	// {x: 1, y: 3, z: 7}

 

โœ” ํ•จ์ˆ˜

- ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ Spread Operator๋กœ ์ž‘์„ฑํ•˜๋Š” ๊ฒฝ์šฐ (Rest Parameter)

ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ์˜ค๋Š” ๊ฐ’๋“ค์„ ๋ฐฐ์—ด์— ๋„ฃ์–ด์„œ ํ•œ ๋ฒˆ์— ๋ฐ›๋Š”๋‹ค.

function sum(...rest) {
	let sum = 0;
    for (let item of rest) {
    	sum += item;
    }
    return sum;
}

console.log(sum(1, 2));	// 3
console.log(sum(1, 2, 3));	// 6

 

- ํ•จ์ˆ˜ ํ˜ธ์ถœ ์ธ์ž๋กœ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ

function sum(x, y, z) {
	return x + y + z;
}

var args = [0, 1, 2];
console.log(sum(...args));	// 3

 


3. Default Parameters(๊ธฐ๋ณธ ๊ฐ’ ๋งค๊ฐœ๋ณ€์ˆ˜)

๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ๋ˆ„๋ฝ๋  ๊ฒฝ์šฐ์— ์‚ฌ์šฉํ•  ๊ธฐ๋ณธ ๊ฐ’์„ ์ง€์ •ํ•œ๋‹ค. ํ•จ์ˆ˜์— ์ „๋‹ฌ๋œ ๊ฐ’์ด undefined ๊ฑฐ๋‚˜ ์—†์„ ๋•Œ ์ดˆ๊ธฐํ™”๋  ์„ค์ • ๊ฐ’์ด๋‹ค.

function add(a, b = 1) {
  return a + b;
}

console.log(add(3, 4));	// 7
console.log(add(3));	// 4, b์—๋Š” 1์ด ๋“ค์–ด๊ฐ

 


4. Template Literal(ํ…œํ”Œ๋ฆฟ ๋ฆฌํ„ฐ๋Ÿด)

์ด์ค‘ ๋”ฐ์˜ดํ‘œ๋‚˜ ๋”ฐ์˜ดํ‘œ ๋Œ€์‹  ๋ฐฑํ‹ฑ(` `)๊ณผ ํ”Œ๋ ˆ์ด์Šค ํ™€๋”(${expression})๋ฅผ ์ด์šฉํ•˜์—ฌ ๋‹จ์ผ ๋ฌธ์ž์—ด๋กœ ์—ฐ๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.

const func1 = (name, age) => {
	return `์•ˆ๋…• ๋‚˜๋Š” ${name}, ${age}์‚ด ์ด์•ผ.`; 
};

console.log(func1('๊ฐ์ž', 10));	// ์•ˆ๋…• ๋‚˜๋Š” ๊ฐ์ž, 10์‚ด ์ด์•ผ.

 


5. Arrow Function(ํ™”์‚ดํ‘œ ํ•จ์ˆ˜)

์ผ๋ฐ˜ ํ•จ์ˆ˜์‹์„ ๊ฐ„ํŽธํ•˜๊ณ  ์งง๊ฒŒ ํ‘œํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค. this ๊ฐ’์„ ๋ฐ”์ธ๋”ฉํ•˜์ง€ ์•Š์•„ ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์— ์œ ์šฉํ•˜๊ฒŒ ์‚ฌ์šฉ๋œ๋‹ค.

 

๊ธฐ์กด์—๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ํ•จ์ˆ˜๋ฅผ ์ •์˜ํ–ˆ๋‹ค.

var add = function (x) { return x + x; };
console.log(add(10));	// 20

 

ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค.

const add = x => x + x;
console.log(add(10));	// 20

 

ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ์˜ ๊ทœ์น™์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

// ๋งค๊ฐœ๋ณ€์ˆ˜ ์ง€์ • ๋ฐฉ๋ฒ•
// 1. ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ์—†์„ ๋•Œ
() => { ... }
// 2. ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ํ•œ ๊ฐœ์ผ ๋•Œ ์†Œ๊ด„ํ˜ธ ์ƒ๋žต ๊ฐ€๋Šฅ
x => { ... }
// ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ๋‘ ๊ฐœ ์ด์ƒ์ผ ๋•Œ ์†Œ๊ด„ํ˜ธ ์ƒ๋žต ๋ถˆ๊ฐ€๋Šฅ
(x, y) => { ... }

// ํ•จ์ˆ˜ ๋ธ”๋ก ์ง€์ • ๋ฐฉ๋ฒ•
// 1. ํ•˜๋‚˜์˜ ๋ผ์ธ๋งŒ ์žˆ์„ ๋•Œ ์ค‘๊ด„ํ˜ธ ์ƒ๋žต ๊ฐ€๋Šฅ, ์ƒ๋žตํ•  ๊ฒฝ์šฐ ์ž๋™์œผ๋กœ return
x => { return x * x }
x => x * x
// 2. ์—ฌ๋Ÿฌ ๋ผ์ธ์ด ์žˆ์„ ๋•Œ๋Š” ์ค‘๊ด„ํ˜ธ ์ƒ๋žต ๋ถˆ๊ฐ€๋Šฅ
x => {
	let add = x + x;
    return add;
}

 


6. for of ... loop

์š”์†Œ๋ฅผ ์ˆœํšŒํ•˜๊ธฐ ์œ„ํ•ด ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์ง€์›ํ•˜๋Š” ๋ฐ˜๋ณต๋ฌธ์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • for ๋ฌธ
  • do...while ๋ฌธ
  • while ๋ฌธ
  • for...in ๋ฌธ
  • for...of ๋ฌธ

์ผ๋ฐ˜์ ์œผ๋กœ๋Š” Array ์š”์†Œ๋ฅผ ๋ฐ˜๋ณตํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜์ง€๋งŒ Array ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ String, Sets, Maps, arguments, NodeList ๋“ฑ์˜ ๊ฐ์ฒด๋“ค๋„ Iteration์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ˜๋ณต์˜ ๋Œ€์ƒ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

 

for in ๊ณผ for of ๋Š” ๋ฐ˜๋ณต ๊ฐ€๋Šฅํ•œ ๊ฐ์ฒด์˜ ๋ชจ๋“  ์›์†Œ๋ฅผ ๋ฐ˜๋ณตํ•˜๋Š”๋ฐ ์ด ๋‘˜์€ ๋ฐ˜๋ณตํ•˜๋Š” ๋Œ€์ƒ์ด ๋‹ค๋ฅด๋‹ค.

โœ” for...in

iterable object ๋ผ๋ฉด ๋ชจ๋‘ ๋ฐ˜๋ณต์˜ ๋Œ€์ƒ์ด ๋œ๋‹ค. ์—ด๊ฑฐ ๊ฐ€๋Šฅํ•œ ๋ชจ๋“  ์†์„ฑ์ด ๋Œ€์ƒ์ด๋‹ค.

๊ฐ์ฒด์˜ key ๊ฐ’์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โœ” for...of

Symbol.iterator ์†์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ปฌ๋ ‰์…˜ ๊ฐ์ฒด๋ฅผ ๋ฐ˜๋ณตํ•œ๋‹ค. iterable object ์—ฌ๋„ prototype chain์— ์˜ํ•œ iterable์€ ๋Œ€์ƒ์—์„œ ์ œ์™ธํ•œ๋‹ค. ๊ฐ์ฒด์˜ value๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

let arr = [1, 2, 3];
arr.foo = "hello";

for (let i in arr) {
   console.log(i);	// 0 1 2 foo
}

for (let i of arr) {
   console.log(i);	// 1 2 3
}

 

์ฐธ๊ณ ์ž๋ฃŒ ๋ฐ ์ถœ์ฒ˜ ๐Ÿ™‡‍โ™‚๏ธ

https://velog.io/@shaqok/ES6-ES6-Syntax-%EC%A0%95%EB%A6%AC

https://velog.io/@kimhscom/JavaScript-%EC%9E%90%EC%A3%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94-ES6-%EB%AC%B8%EB%B2%95-%EC%A0%95%EB%A6%AC

 

https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference

 

๋Œ“๊ธ€