Modern JavaScript: 10 ES2024+ Features You Should Be Using
By The CodeCraft Teamยทยท8 min read

JavaScript has changed more in the last five years than in the previous twenty. Here are the modern features that genuinely make your code shorter, safer, and easier to read.
- Optional chaining โ user?.profile?.name
- Nullish coalescing โ value ?? "fallback"
- Logical assignment โ a ??= 10
- structuredClone() for deep copies
- Array.prototype.at(-1) โ last element
- Object.groupBy() โ group an array by key
- Top-level await in ES modules
- Promise.withResolvers()
- String.prototype.replaceAll()
- Private class fields with #
Examples
const last = arr.at(-1);
const grouped = Object.groupBy(users, u => u.role);
const copy = structuredClone(obj);Frequently asked questions
Do I need a transpiler for these?
All major evergreen browsers support these. Drop Babel for typical greenfield projects in 2026.
Keep reading
External references
Enjoyed this article?
Share it with a fellow developer or explore more tutorials in our blog.
More articles