JavaScript ES6+ Features Reference
Key JavaScript features from ES6 through ES2022: arrow functions, template literals, destructuring, spread, async/await, optional chaining, nullish coalescing, and top-level await.
Key JavaScript features from ES6 through ES2022: arrow functions, template literals, destructuring, spread, async/await, optional chaining, nullish coalescing, and top-level await.
| Name | Version | Description | Example |
|---|---|---|---|
| Arrow Functions | ES6 (2015) | Concise function syntax with lexical this binding | const add = (a, b) => a + b; |
| Template Literals | ES6 (2015) | String interpolation with backticks and ${} | `Hello, ${name}!` |
| Destructuring | ES6 (2015) | Unpack values from arrays or objects into variables | const {name, age} = person; |
| Spread Operator | ES6 (2015) | Expand iterables into individual elements | const merged = [...arr1, ...arr2]; |
| Async/Await | ES8 (2017) | Syntactic sugar over Promises for async code | const data = await fetch(url); |
| Optional Chaining | ES2020 | Safe nested property access without null check | user?.profile?.name |
| Nullish Coalescing | ES2020 | Fallback for null/undefined only (not falsy) | const x = value ?? defaultValue; |
| Top-level Await | ES2022 | Use await outside async functions in modules | const config = await loadConfig(); |
The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.
curl "https://yjtoon.com/api/dataset/javascript-es6-features?format=toon"
const res = await fetch( "https://yjtoon.com/static-data/dataset/javascript-es6-features.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →