I wonder if a string that contains only a carriage return can have its length = 0.
What are the lengths of , , and ?
I think in my app i have detected such as cases but i'm not sure. I have to make sure i'm writting correct conditions when trying to detect empty strings and those with carriage return in them.
Cheers
The lengths are 1, 1 & 2 as can easily be demonstrated.
console.log(` `.length); console.log(` `.length); console.log(` `.length);
2.1m questions
2.1m answers
60 comments
57.0k users