Make sure we cover in a test the unary + conversion
samuelgoto opened this issue · 1 comments
samuelgoto commented
Came up in the review.
We should make sure that + "1_0"
is converted to 10
while using the unary plus operator (should be because it uses the Number constructor, but we wanted to sanity check).
leobalter commented
IIRC we intentionally set numeric separator to not affect string to number operations to avoid breaking the web. So + "1_0"
will consistently evaluate to NaN
and the separator tokens are only valid within Numeric Literals.