In JavaScript on Chrome and Firefox:
isNaN( "\n" ) gives false
parseFloat ( "\n" ) gives NaN
The same is yielded for \t, \r and \f.'
\nis a number- Parsed
\ngives you Not A Number. - Escaped characters such as the NULL byte
\0,\\and\"do work as expected. - We know that
NaNis a number, just not representable by any other value - So
\nis a number, that's not representable.
Why do browsers implement it this way?