In this blog post, we will examine the features that come with ES2021. ECMAScript (ES) is a branded scripting language specification, standardized by ECMA-262 and ISO/IEC 16262.
- Ability to work with HTML/CSS.
- One of the most well-known is that it comes by default in all browsers and works without any problems.
- It allows you to do easy things more easily.
Logical or Assignment (||=)
As the people’s property of the company object is not null in the codes above, there will be no assignment process.
Will be an assignment because state is null.
Finally, to give an example; In other words, if the value is null or initial value such as 0 , ' ' , the assignment takes place. Babel output
Logical AND assignment (&&=)
The logical and assignment operator assigns only if x is true. Code with Babel output
Logical Nullish Assignment (??=)
Preliminary information priority is the left expression, if the 2nd priority is null, the other expression is checked.
The replace command normally performs multiple insertions for a single string. This problem can be solved with regex. But now there is the replaceAll function.
Data types such as hex, bigint, decimal, binary integer can be kept as variables. Final state of the project