What’s New in ECMAScript 2025
June 30, 2025What’s New in ECMAScript 2025
On June 25, 2025, Ecma International officially approved ES2025, adding several useful features:
1. 📦 Import Attributes & JSON Modules
You can now import JSON directly with type annotations:
// Static import
import config from './config.json' with { type: 'json' };
// Dynamic import
const cfg = await import('./config.json', { with: { type: 'json' } });
console.log(cfg.default);
2. Iterator Helper Methods
New chaining helpers on iterators:
const arr = ['a','', 'b', '', 'c', '', 'd'];
const result = arr.values()
.filter(x => x.length > 0)
.drop(1)
.take(2)
.map(x => `=${x}=`)
.toArray();
// result: ['=b=', '=c=']
3. New Set
Methods
Set operations become built-in:
const a = new Set(['a','b','c']);
const b = new Set(['b','c','d']);
console.log([...a.union(b)]); // ['a','b','c','d']
console.log(a.isSubsetOf(b)); // false
4. RegExp.escape()
& Pattern Modifiers
const safe = RegExp.escape('hello?');
// inline flags example
/^x(?i:HELLO)x$/.test('xHELLOx'); // true
/^x(?i:HELLO)x$/.test('xhellox'); // true
5. Duplicate Named Capture Groups
const re = /(?a+)|(?b+)/v;
console.log(re.exec('aaa').groups.chars); // 'aaa'
console.log(re.exec('bb').groups.chars); // 'bb'
6. Promise.try()
Promise.try(() => {
const x = syncThatMightThrow();
return asyncWork(x);
}).then(...).catch(...);
7. float16 Support
Now built-in: Float16Array
, DataView.getFloat16/setFloat16
, and Math.f16round()
.
Blog
Object-Oriented Programming (OOP) – Core Concepts
Aug 09, 2025
Object-Oriented Programming (OOP) is a modern software development approach that divides an application into units called Objects that interact with...
Task Reminder with Laravel & MongoDB
Jun 30, 2025
📌 Building a Task Reminder App This guide shows how to set up a Laravel app using MongoDB to implement a task reminder system with authentication,...
React History – A Professional Developer’s Perspective
Jul 26, 2025
1. Origins: Born Inside Facebook In 2011, Facebook engineers faced the increasing complexity of building interactive UIs at scale. They developed...
React Native 0.80 & ExecuTorch: A Powerful Leap into Offline AI for Mobile Apps
Jul 28, 2025
🚀 What’s New in React Native 0.80? The React Native 0.80 release marks a pivotal moment in mobile development. This update not only enhances...
Laravel 12.21.0 – A Smart Update for Cleaner Queries and Stricter Validation
Aug 03, 2025
Laravel 12.21.0 introduces two game-changing features aimed at writing cleaner, more maintainable code. The update includes the new whereValueBetwe...
React Hooks Complete Guide
Jul 01, 2025
🎣 Complete React Hooks Guide with Practical Examples 🧠 useState What it does: Adds local state to a function component. Code Example: impo...
