Hacker News new | ask | show | jobs
by bit2mask 3988 days ago
This character is "OGHAM SPACE MARK"[1], which is a space character. So the code is equivalent to alert(2+ 40). From what I know, any unicode character in the Zs class is a white space character in JS[2], but there don't seem to be that many[3]. However, JS also allows unicode characters in identifiers[4], which lets you use interesting variable names like ಠ_ಠ

[1]: https://codepoints.net/U+1680

[2]: https://www.ecma-international.org/ecma-262/6.0/#sec-white-s....

[3]: https://codepoints.net/search?q=&na=&int=&gc[]=Zs&Bidi_M=&Bi....

[4]: https://mathiasbynens.be/notes/javascript-identifiers-es6