logoalt Hacker News

Izkatatoday at 3:15 AM0 repliesview on HN

Unary "+" returns NaN for strings that don't contain exactly a number (except for empty string which standard type conversion turns into 0). It even works for scientific notation like +'1e3' === 1000.