0

What is the result of converting Null to boolean in JavaScript.

Shortcircuiting

30th Jan 2021, 9:05 AM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
5 ответов
+ 3
It is always false to things without a value let x = null ---- False let x = 0 ---- False let x = -0 ---- False let x = '' (empty string) ---- False let x ------ False
30th Jan 2021, 9:12 AM
MomchilSotirov
MomchilSotirov - avatar
0
@MomchilSotirov, thank you
30th Jan 2021, 9:19 AM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
0
How about let's say you write a simple value statement like 1; Is any anonymous memory location allocated?
30th Jan 2021, 9:21 AM
PRINCE TAWIAH
PRINCE TAWIAH - avatar
0
I am just on the way of learning sooo i'm not pretty sure😅. I think not. So much as i know it is anonymous memory in loops.
30th Jan 2021, 9:37 AM
MomchilSotirov
MomchilSotirov - avatar
0
OK, thanks
30th Jan 2021, 9:40 AM
PRINCE TAWIAH
PRINCE TAWIAH - avatar