본문 바로가기
Node.js

[ECMAScript] ES6 이후의 변경점

by yonikim 2021. 9. 17.
728x90

ES6(ES2015)

- Array.prototype.includes()

- 지수 연산자 

 

ES2017

- 문자열 패딩

- Object.entries() / Object.values()

- Object.getOwnPropertyDescriptors()

- Trailing Comma

- Atomics, SharedArrayBuffer

 

ES2018

- Object rest/spread

- Async iteration

- Promise.prototype.finally()

- 정규식 기능 추가

 

ES2019

- Array.prototype.flat() / Array.prototype.flatMap()

- Object.fromEntries()

- String.prototype.trimStart() / String.prototype.trimEnd()

- Optional catch

try {   
	new Error('hello');
} catch {   
	console.error('에러가 나든지 말든지');
}

- Function.prototype.toString()

- Symbol.prototype.description

 

ES2020

- Bigint

- Dynamic import

- 옵셔널 체이닝

- Promise.allSettled()

- Null coalescing operator(null 병합 연산자)

- String.prototypematchAll()

- 모듈 네임스페이스 export 문법

- import.meta

- global this

 

ES2021

- String.prototype.replaceAll()

- Promise.any()

- 논리 연산자와 할당 표현식 

- 숫자 구분 기호

- WeakRef

- Intl.ListFormat

- Intl.DateTimeFormat의 dateStyle 및 timeStyle

 

728x90