ES 2020 news

What is ECMAScript?

ES2020

BigInt

new primitive to work with large numbers

Nullish operator

replacement for || operator

Optional chaining

no more pain with a.b.c!

Dynamic Imports

So async. Much modules. Wow

Promise.allSettled

like .all but no :)

globalThis

Unified link to global object for browsers/node.js/workers

String.prototype.matchAll()

New method to work with RegExp's

Proposals that most likely we will see next year

Numeric Literals

0x1F + 9 + 0b10 = 42

Class Fields

Finally!

Private Class Fields

#FINALLY!

WeakRef & FinalizationGroups

new way to shoot in leg🔫🔫🔫

Last years recap

ES2018 & 2019

ES2018

  • RegExp improvements :
    • Named groups
    • dotAll flag
    • Unicode aware regexp
    • look behind assertions
  • Async Iteration
  • Promise.finally()
  • Rest/Spread properties

ES2019

  • Object.fromEntries()
  • String.prototype.trimStart()/trimEnd()
  • Array.prototype.flat()/flatMap()
  • Symbol.prototype.description
  • Function.prototype.toString() revision

Browser compatibility list

Feature: Chrome Safari Firefox Edge Opera Node.js Babel
Class fields 72 - 69 - 60 12.0.0 +
Private Class Fields 74 - - - 62 12.0.0 +
Weak Ref - - - - - - -
Numeric Literals 75 - 70 44 62 12.5.0 +
BigInt 67 - 68 - 54 10.4.0 +
Dynamic Import 80 11.1* 67 - 50 12.0.0* +
Promise .allSeteled 76 13 71 - 67 12.9.0 +
Nullish Operator 80 - 72 - - - +
Optional Chain Operator 80 - 74 - 67 - +
String.prototype.matchAll 73 - 67 - 60 12.0.0 +

Title Text

ES2020 Tech Talk

By Gleb Zhidkov

ES2020 Tech Talk

- ES18-19 recap - ES2020 features - Stage 4 proposals - Browser compatibility

  • 29