Closed
Description
Search Terms:
numeric separator
spec test for checking leading zero separated literal
Code
These literals should be invalid:
0_0
0_0.0
0_0e0_0
0_0_1
but this should valid:
1_0.0_1 // 10.01
1_0e0_1 // 100
Expected behavior:
SyntaxError: Numeric separator can not be used after leading 0.
Actual behavior:
0_0 // -> 0 valid but shouldn't
0_0.0 // -> 0 valid but shouldn't
0_0e0_0 // -> 0 valid but shouldn't
0_0_1 // -> 1 valid but shouldn't. Btw 001 is invalid in strict mode
1_0.0_1 // -> 10.01 ok
1_0e0_1 // -> 100 ok