However we can express very large numbers using BigInt, there are some constraints when BigInt type is used with regular numbers. It cannot be used with methods in the built-in Math object and cannot be associated with instances of Number in operations. They must be used with the same type.
BigInt is not backward compatible with (IEEE754) standards because this number system cannot support very large numbers.
Let’s see how it’s works.
Looking at this we can clearly say Nullish Coalescing ** ** operator** (??)** is a logical operator that returns its right-hand side operand when its left-hand side operand is _ null _ or _ undefined _, otherwise returns its left-hand side operand.
Contrary to the logical OR ( || ) operator, the left operand is returned if it’s falsey ** value which is not _ **null _ or _ undefined _. See below for an example.
Looking at the above example, the OR operator always returns a truthy value, whereas the nullish coalescing operator returns a specified value.
Dynamic import feature will serve you ship on-demand-request code, without the overhead of Webpack or other module bundlers. This is known as *code splitting, * as the code is addressed in smaller bundles as required.
Look at the following example to understand how we dynamically import _ math.js _ module.
Here the _ math.js _ module is lazy loaded particularly when it is needed. This overcomes the initial page load times of our application. It also limits unnecessary module load in every page visit sessions even if the user uses the module feature or not.
Static _ import _ and dynamic import() are both helpful. Each has its own, very distinct, use cases. Use static _ imports _ for beginning paint dependencies, especially for above-the-fold content. Furthermore in other cases, examine loading dependencies on-demand with dynamic import().
- Node.js uses _ global _
- Web workers use _ self _
The optional chaining syntax allows you to access deeply nested object properties without worrying about whether the property exists or not. If it exists, great! If not,_ ** undefined** _ will be returned.
This works not only on object properties but also on function calls and arrays. Super convenient! Here is an example:
The _ Promise.allSettled _ method accepts a series of Promises and only resolves when they are all resolved, resolved, or rejected.
_ matchAll _ is a new method added to the _ string _ prototype that is related to regular expressions. This returns an iterator that returns all the matching groups one after the other. Let’s take a look at a quick example: