Skip to content

JavaScript Tutorial Modern JavaScript

Modern JavaScript Features at a Glance

Lesson 174 of 258 2 min read By Deepak Paswan Updated Oct 4, 2026

“Modern JavaScript” is not one version. It is the style of code written with the features added since ES2015, and still being added every year. Here is a map of the features worth knowing, grouped by the problem they solve, with links to the lessons.

Declaring and organising code

FeatureWhat it replacesLesson
const and letvarlet and const
ES modules (import, export)script tags, IIFEs, globalsModules
Classes with fields, #private, staticconstructor functions and conventionsClasses
Optional catch binding (catch { })catch (e) when you do not use etry…catch

Writing less code

FeatureExample
Arrow functionsn => n * 2
Template literalstext with ${name} placeholders
Default and rest parametersfunction f(a = 1, ...rest)
Destructuringconst { name, age } = user
Spread[...list, item], { ...defaults, ...options }
Property shorthand{ name, age }

Safer, clearer logic

FeatureExample
Optional chaininguser?.address?.city
Nullish coalescingvalue ?? "default"
Logical assignmentcache ??= {}
Object.hasOwn()replaces obj.hasOwnProperty(key)
at()list.at(-1) for the last item

Working with data

FeatureExample
map, filter, reduce, find, some, everyArrays
Object.entries, Object.fromEntriesObjects
Map and SetCollections
structuredClone()deep copies
Non-mutating array methods (toSorted, with…)Immutable updates

Asynchronous code

FeatureLesson
PromisesPromises
async / awaitasync and await
Promise.all, allSettled, anyPromise.all
fetch() and AbortControllerFetch API
Dynamic import()Dynamic import

Small syntax helpers

script.js
JS
const big = 1_000_000;            // numeric separators
console.log(big);                  // → 1000000

console.log(2 ** 8);               // → 256   (exponent operator)

let settings = null;
settings ??= { theme: "dark" };    // logical assignment
console.log(settings.theme);       // → dark

console.log([1, 2, 3].at(-1));     // → 3
console.log(Object.hasOwn({ a: 1 }, "a")); // → true

You do not need to use every feature

Modern does not mean “use the newest thing”. It means picking the clearest tool for the job. If a plain for loop is easier to read than a clever chain, use the loop.

The language keeps changing

New features are added every year (JavaScript Versions). The next lessons cover the smaller helpers, the very recent additions where you should check support, and how to keep up without chasing every proposal.