New course! Every coder should learn Generative AI!
Try a free lesson+ 7
"... The JS spec is that any == comparison with a boolean first coerces the boolean to a number... "
"... to compare a string and a number, JS converts the string to a number... "
https://stackoverflow.com/questions/33705381/is-a-string-of-whitespace-truthy-or-falsy-in-javascript
+ 6
Give these excellent articles a read.
https://www.sitepoint.com/javascript-truthy-falsy/
https://hackernoon.com/understanding-js-coercion-ff5684475bfc
+ 5
" " is not an empty string, an empty string is ""
" " is a string contains spacing character.
" " is a string contains 3 spacing characters.
How could a string contains 3 characters return false as empty string?
+ 4
s.IndexOf(' ') > 0 means whitespaces are there ....🤔
0
Https://code.sololearn.com/
W5mqnu9RxVK2