0

This may sound stupid question but i can't figure out why in a string

This is some random text.

I can't find any spaces in this string

Then I thought may be i just copy the blank space between two words and compare with space guess what it gives false

console.log(' ' == ' ');

here is the fiddle

couldn't figure out why this is happening

UPDATE

Is there any way to find any type of blank spaces in string weather that be any any character code?

Rajesh Jangid
  • 724
  • 6
  • 13

1 Answers1

2

It appears that the string is using the html entity   which is a non-breaking space character, which is indeed different than the ' ' space character.

Michael Dunlap
  • 4,300
  • 25
  • 36