Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

^ is XOR. The author’s “translation” to JavaScript made inconsistent changes in the notation. Here we’re XOR between 2 and a non numeric value, which is coerced into a Number (NaN I think here), and NaN bitshifted with anything gives that thing.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: