

This operator lets us use a default value whenever something is missing.

This expression is defaultValue if value is either undefined or null and value otherwise. Private slot checks (“ergonomic brand checks for private fields”): The following expression checks if obj has a private slot #privateSlot:

Private fields ( instance private fields and static private fields).Private slots are new and can be created via:.Properties (public slots) can now be created via:.The following proposals have reached stage 4 and are scheduled to be part of that standard: 4.1 New in ECMAScript 2022ĮS2022 will probably become a standard in June 2022. It starts after ES2015 (ES6) because that release has too many features to list here. This chapter lists what’s new in ES2016–ES2022 in reverse chronological order.
