target: "es2018"
来源:1-1 导学(不看错过1个亿)

ywang04
2022-09-13
Name Contents
ES5 Core definitions for all ES3 and ES5 functionality
ES2015 Additional APIs available in ES2015 (also known as ES6) - array.find, Promise, Proxy, Symbol, Map, Set, Reflect, etc.
ES6 Alias for “ES2015”
ES2016 Additional APIs available in ES2016 - array.include, etc.
ES7 Alias for “ES2016”
ES2017 Additional APIs available in ES2017 - Object.entries, Object.values, Atomics, SharedArrayBuffer, date.formatToParts, typed arrays, etc.
ES2018 Additional APIs available in ES2018 - async iterables, promise.finally, Intl.PluralRules, regexp.groups, etc.
ES2019 Additional APIs available in ES2019 - array.flat, array.flatMap, Object.fromEntries, string.trimStart, string.trimEnd, etc.
ES2020 Additional APIs available in ES2020 - string.matchAll, etc.
ES2021 Additional APIs available in ES2021 - promise.any, string.replaceAll etc.
ESNext Additional APIs available in ESNext - This changes as the JavaScript specification evolves
DOM DOM definitions - window, document, etc.
WebWorker APIs available in WebWorker contexts
ScriptHost APIs for the Windows Script Hosting System
老师 上面这部分是您给出的链接里的内容。想问下是不是ES2018包含的内容多于es6?
1回答
-
同学你好
说的没错
你仔细看这些内容,就会发现 es 随着版本的增加,都是在添加新的 API,所以你的说法是正确的,es2018 内容要多于 es6
012022-09-14
相似问题