Wamaitha
banner
wamaitha.bsky.social
Wamaitha
@wamaitha.bsky.social
Former baby👼🏾
Engineer 🦸🏾‍♀️
Bibliophile 🧝🏾
Vipassana meditator🧚🏾‍♀️
Yada yada yada ...
6. NaN: Represents "Not-a-Number."
(5/5)
January 2, 2025 at 7:59 PM
So what happens when the 'value' is a falsy value like 'false' , '0' , or an empty string ("")? Let's look at a simple function that simply prints the name passed as the argument.

We expect the function to print 'Hello Guest!' when we pass null and undefined. (3/5)
January 2, 2025 at 7:59 PM
The nullish coalescing operator (??) is a JavaScript operator that provides a way to assign a default value to a variable or expression when the value is null or undefined. The general format is as shown in the image below. (1/5)
January 2, 2025 at 7:59 PM