ECMAScript 6 (ES6) New Features
Name |
Description |
let keyword |
It is used to declare variables in JavaScript that are block-scoped. |
const keyword |
It is used to declare variables with immutable values. |
Arrow Functions |
It defines anonymous functions in JavaScript. |
The … Operator |
Spread/rest operator unpacks elements (spread) or gathers (rest) them conveniently. |
For/of |
Iterates over values in iterable objects like arrays, and strings. |
Map Objects |
It stores key-value pairs, allowing any key type. |
Set Objects |
It stores unique values, preventing duplicates. |
Classes |
It is used to define blueprints for creating objects. |
Promises |
Manage asynchronous operations, simplifying callbacks and async handling. |
Symbol |
It is unique, immutable, used for private property keys. |
Default Parameters |
Sign values when function arguments are not provided explicitly. |
Function Rest Parameter |
Collects function arguments as an array for flexible parameter handling. |
String.includes() |
Checks if substring is present, returning true/false result. |
String.startsWith() |
Checks if string begins with specified substring, returning boolean. |
String.endsWith() |
Checks if string ends with provided substring, returning boolean. |
Array.from() |
Converts array-like/iterable objects to new array with optional mapping. |
Array keys() |
Iterates over array indices, allowing index-based iteration. |
Array find() |
Locates and returns the first array element satisfying a provided condition. |
Array findIndex() |
Retrieves the index of the first array element satisfying a given condition. |
New Math Methods |
Methods to perform some mathematical functions. |
New Number Properties |
Methods to perform some numeric functions, that contains the date, integers, and floating points, etc |
New Number Methods |
Number.isInteger() and Number.isSafeInteger() |
New Global Methods |
isFinite() and isNaN() |
Object entries |
Converts object properties to an array of [key, value] pairs |
JavaScript Modules |
Encapsulate code for better organization and reusability. |
JS 2015 or ECMAScript 6 (ES6)
JS 2015 (ES6) also known as ECMAScript 6 (ES6), ECMAScript 6 (ES6) is a significant update to JavaScript, introducing arrow functions, classes, template literals, let and const for variable declaration, enhanced object literals, destructuring, and more modern features for better code organization and readability.
Contact Us