Javascript WTF

A site where we can all share in those little WTF moments we enjoy with Javascript


toString on numbers

You can cast floats to strings, but not integers.

> 3..toString()
"3"
> 3.toString()
Uncaught SyntaxError: Invalid or unexpected token