Unicode invisible characters

I saw a twitter about JavaScript test.

js test
js test

So i thinking a little while. And found a answer.

My answer
My answer

How doest it worked? Not have an error: indentifier a has already been declared. It just like redeclared the variable.

Answer is Unicode invisible characters. In Unicode.There have some char that not visible in our eyes.But computer can parse it.

So this two a not same. First is really a .Second actually is a\u200d. You can use some online unicode tools to decode or encode it. That is pretty fine.

In unicode.There are many invisible characters. Some hackers use these characters to attack. It’s hard to find it.