ES3 (1999): Gave us features like
catchfor handling errors.
ES5 (2009): Added methods to work with JSON data and new ways to deal with objects.
ES6 / ES2015: Big update that added
const, arrow functions, template literals, and more.
ES2016: Introduced the exponentiation operator
ES2018: Brought in rest/spread properties,
Promise.finally, and asynchronous iteration.
trimEnd, and optional catch binding.
ES11 / ES2020: Introduced optional chaining (
?.), nullish coalescing operator (
??`),`BigInt, and dynamic import.
A great way for you to check feature compability with your intended
runtime/browser is to check MDN, this is an example of
// CommonJS const fs = require("fs"); // ES Modules import fs from "fs";
Switching to ES modules will make your code cleaner and easier to manage, especially as you work on larger projects. It also optimizes for both static analysis and tree shaking. This can lead to better-optimized bundles and cleaner codebases, making it easier to get rid of outdated dependencies and polyfills.
libraries to the native
have leaned on jQuery's
$.ajax or other similar custom solutions to make
asynchronous HTTP requests. Today, the built-in
fetch function gives a more
standardized way to achieve the same, without relying on any external libraries.
More Optimized: Native features are generally faster and more efficient than their library counterparts.
Well-Supported: Being part of the language specification, you can expect consistent support across all modern browsers.
Less Redundant: Using built-in features reduces the need for external libraries, ensuring faster page loads and optimized performance.
Have a look at tc39.es for full history of ECMAScript, and current proposals.