ES6(ES2015) 이후의 변경점(ES2015~ES2023)
ES2015
const obj = { objName: 'seungdeok' }; const { objName } = obj; const arr = ['seungdeok']; const [arrName] = arr;const arr = [1,2,3]; const max = Math.max(...arr);const obj = { key1: 1, key2: 2 }; for (const item of obj) {} // Uncaught TypeError: obj is not iterable const map = new Map(); map.set('key', 1); for (const item of map) {} // ['key', 1] const arr = [1,2,3]; for (const item of arr) {} // 1, 2, 3 순서const defaultValue = 10; function f(x = defaultValue) {}function f(first, ...rest) {} f(1,2,3,4,5)
ES2016
ES2017
ES2018
ES2019
ES2020
ES2021
ES2022
ES2023
참조
Last updated