Sololearn: Learn to Code
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
7th May 2019, 11:49 AM
Hatsy Rei
Hatsy Rei - avatar
+ 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?
7th May 2019, 12:05 PM
Calviղ
Calviղ - avatar
+ 4
s.IndexOf(' ') > 0 means whitespaces are there ....🤔
8th May 2019, 3:47 AM
Sanjay Kamath
Sanjay Kamath - avatar
0
Https://code.sololearn.com/ W5mqnu9RxVK2
22nd May 2019, 2:12 AM
Marley