Question
What is ECMAScript?
Answer
ECMAScript (ES) is the official specification standard that JavaScript is based on. It is maintained by ECMA International under the technical committee TC39.
Important versions:
- ES5 (2009) –
strict mode,JSON, array methods - ES6 / ES2015 –
let,const, arrow functions, classes, template literals, modules - ES2017 –
async/await - ES2020 – Optional chaining
?., Nullish coalescing??
// ES6 features
const greet = (name) => `Hello, ${name}!`;
console.log(greet("World")); // Hello, World!
Key Points
- ECMAScript is the spec; JavaScript is the implementation
- New ES versions are released yearly
- Babel transpiles modern ES to older versions for browser compatibility