Nullish coalescing, javascript 2020
The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
Earlier, when one wanted to assign a default value to a variable, a common pattern was to use the logical OR operator (||)
This works well for the common case of null and undefined values, but there are a number of falsy values that might produce surprising results
The nullary coalescing operator is intended to handle these cases better and serves as an equality check against nullary values (null or undefined).
Supported Browsers
chrome v80 and firefox v72
----
Follow Me Online Here:
Twitter: / shrideepghag
GitHub: https://github.com/Shrideep
LinkedIn: / shrideep-ghag-4a665251
Instagram: / shrideep.ghag
Смотрите видео Nullish coalescing, javascript new features 2020 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Shrideep ghag 21 Февраль 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 170 раз и оно понравилось 6 людям.