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.

Similar Reads

ECMAScript 6 (ES6) New Features

...

Method 1: let and const keyword

JavaScript let is a keyword used to declare variables in JavaScript that are block scoped. JavaScript const for declaring variables with immutable values, enhancing code stability and readability....

Method 2: Arrow Function

...

Method 3: Spread Operator

Arrow functions were introduced in the ES6 version.Arrow functions are anonymous functions i.e. functions without a name and are not bound by an identifier. Arrow functions do not return any value and can be declared without the function keyword. They are also called Lambda Functions....

Method 4: for/of Loop

...

Method 5 : Map Objects

The Spread operator allows an iterable to expand in places where 0+ arguments are expected. It is mostly used in the variable array where there is more than 1 value is expected....

Method 6: Set Objects

...

Method 7: Promises

The for…of loop in JavaScript iterates over iterable objects, like arrays, strings, for concise and readable element access and iteration....

Method 8: ES6 Symbol

...

Method 9: Default Parameters

In JavaScript, a Map object holds key-value pairs, allowing any type of key, unlike objects. It maintains order and provides methods for manipulation and retrieval....

Method 10: Rest Parameter

...

Method 11: String.includes() Method

In JavaScript, a Set object stores unique values of any type. It ensures uniqueness, provides methods for manipulation, and doesn’t allow duplicate values within the set....

Method 12: String.startsWith() and String.endsWith() Methods

...

Method 13: Array methods

Promises in JavaScript manage asynchronous operations, representing eventual results or errors. They simplify handling async code with methods like .then(), .catch(), and allow chaining....

Method 14: New Math Methods

...

Method 15: New Number Methods

ES6 Symbol is a unique, immutable data type used as object property keys, ensuring uniqueness. It’s primarily for internal/private use, avoiding unintended clashes in properties....

Method 16: New Global Methods

...

Method 17: Object Entries

It is used to give the default values to the arguments, if no parameter is provided in the function call....

Contact Us