bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/Debugging, Projects, and Reference
JavaScript•Debugging, Projects, and Reference

ECMAScript 2020

Concept visual

ECMAScript 2020

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

New Features in JavaScript 2020

Feature

Description

BigInt

Stores values too big to store in a JavaScript number

String matchAll()

Searchs for all occurrences of a string in a string Promise.allSettled() Takes promises as input and returns a single promise

Dynamic Import

Loads JavaScript modules at runtime globalThis

Refers to the global object independent of code environment import.meta

Returns an object indicating the base URL of a module

Namespace Exports

Export a full namespace from a module without having to import it first

New JavaScript Operators in 2020

Oper

Description

?? Nullish coalescing returns the first argument not nullish ?. Optional chaining returns undefined if an object is undefined or null &&= Logical AND assignment assigns the second value if the first value is true ||= Logical OR assignment assigns the second value if the first value is false ??= Nullish coalescing assignment assigns the second value if the first value is undefined or null

Browser Support

ECMAScript 2020 is supported in all modern browsers since April 2021.

Chrome

80

Edge

80

Firefox

80

Safari

14.1

Opera

67

Feb 2020

Feb 2020

Aug 2020

Apr 2021

Mar 2020

JavaScript BigInt

BigInt variables are used to store big integer values that are too big to be represented by a a normal JavaScript Number. JavaScript integers are only accurate up to about 15 digits.

Integer Example

let x = 999999999999999;
let y = 9999999999999999; // too big

Previous

ECMAScript 2021

Next

ECMAScript 2019