ES6+ Features Every JavaScript Developer Should Know
Modern JavaScript (ES6 and beyond) added arrow functions, destructuring, template literals, spread/rest, modules and more. Here are the ES6+ features you'll use every day, with examples.
Modern JavaScript — ES6 (2015) and the yearly updates since — transformed the language from verbose to expressive. The features you’ll use every single day are arrow functions, destructuring, template literals, the spread/rest operator, default parameters, and modules, plus later additions like async/await, optional chaining, and nullish coalescing.
If you learned older JavaScript, these are the upgrades that modernise your code; if you’re new, these are JavaScript now. Here’s the essential set.
let and const
Block-scoped variable declarations that replaced var. Covered fully in var vs let vs const — the short version: const by default, let to reassign.
Arrow functions
Shorter function syntax that inherits this from its surroundings — ideal for callbacks.
const double = (n) => n * 2;
nums.map((n) => n * 2); // concise callbacks
The key behavioural difference from regular functions: arrows have no own this (see the this keyword), which is exactly why they’re the go-to fix for lost-this bugs.
Template literals
String interpolation with backticks — no more + concatenation:
const name = "Ana";
const greeting = `Hello, ${name}! You have ${count} messages.`;
They also support multi-line strings directly.
Destructuring
Unpack arrays and objects into variables in one line:
const { name, age } = user; // object destructuring
const [first, second] = list; // array destructuring
const { city = "Unknown" } = user; // with a default
It’s everywhere in modern code, especially for function parameters and imports.
Spread and rest (...)
The same three dots do two complementary jobs:
const merged = [...arr1, ...arr2]; // spread: expand
const copy = { ...original, active: true }; // spread into a new object
function sum(...nums) { // rest: gather
return nums.reduce((a, b) => a + b, 0);
}
Spread expands a collection; rest gathers arguments into an array.
Default parameters
function greet(name = "friend") {
return `Hi, ${name}`;
}
greet(); // "Hi, friend"
Modules (import/export)
Split code across files with import/export — the foundation of every modern project:
// math.js
export const add = (a, b) => a + b;
// app.js
import { add } from "./math.js";
The later essentials (ES2017+)
- async/await — readable asynchronous code (see promises and async/await).
- Optional chaining
?.— safely access nested properties:user?.address?.cityreturnsundefinedinstead of throwing. - Nullish coalescing
??— a default only fornull/undefined:const port = config.port ?? 3000(unlike||, it keeps0and"").
Common mistakes
- Using
||for defaults when you mean??—count || 10wrongly replaces a valid0. Use??for null/undefined-only defaults. - Arrow functions as object methods when you need
thisto be the object — an arrow won’t bind to it. - Over-destructuring into unreadable lines — clarity first.
See more in common JavaScript mistakes.
Where this fits
ES6+ features run through every phase of the JavaScript roadmap, and they make array methods and async code concise.
The modern syntax is used throughout JavaScript in One Month and explored in depth — including the newer yearly additions — in the job-ready JavaScript in Three Months.
Learn the daily set well and you’re writing idiomatic, modern JavaScript.
Frequently asked questions
What is ES6 in JavaScript?
ES6 (ECMAScript 2015) was a major update to JavaScript that introduced let and const, arrow functions, template literals, destructuring, the spread/rest operator, default parameters, classes, modules, and promises. 'ES6+' refers to ES6 and all the yearly updates since, which added features like async/await, optional chaining, and nullish coalescing.
What are the most important ES6 features to learn?
The everyday essentials are let/const, arrow functions, template literals, destructuring, the spread/rest operator, default parameters, and modules (import/export). Slightly later additions you'll use constantly are async/await, optional chaining (?.), and nullish coalescing (??). These make up the bulk of modern JavaScript syntax.
What is the difference between an arrow function and a regular function?
Arrow functions are shorter to write and do not have their own 'this' — they inherit it from the surrounding scope, which makes them ideal for callbacks. Regular functions get their own 'this' based on how they are called. Arrow functions also cannot be used as constructors and have no 'arguments' object.
What is destructuring in JavaScript?
Destructuring is a syntax for unpacking values from arrays or properties from objects into variables in one step. For example, const { name, age } = user pulls name and age out of the user object, and const [first, second] = list pulls the first two array elements.