Look closely, here “” an empty string is falsy but a string with just an empty space represents truthy value. Because a space is still something.
I will make it easy for you by giving some examples.
a. Not assigning a value in a variable = undefined.
b. Not returning from a…
Now you may ask why should I use React? I can use any framework I need and they have solutions for some very important problems. So why should I use a…
Primitive Values are consisted of string, number, bigint, boolean, undefined, symbol, and null. And these primitive values have something in common. They can not be altered . There’s nothing a programmer can do to affect them.
Sometimes people get confused over primitive values and variables that are assigned with primitive values. Let’s look at it this way, “You can always change the value assigned to a variable cause that’s literally a variable is for. Here you are assigning another primitive value in that variable. You are not changing the previous primitive value.”