I am learning javascript and I am analyzing existing codes.
In my JS reference book, it says to search on a single space use “\s“?
But I have came across the code
obj.match(/Kobe Bryant/);
Instead of using \s, it uses the actual space?
Why doesn’t this generate an error?
The character class
\sdoes not just contain the space character but also other Unicode white space characters.\sis equivalent to this character class: