Closed domenic closed 6 years ago
Seconded; I was surprised by this in the explainer (which just has "0x1" examples) and even more surprised by the spec text. I was expecting these to be SyntaxErrors.
a29f339980abb55d93f50c650294eedf071363d5 includes this change. Please take a look and let me know of any issues.
This proposal seems to have as its goals tightening up some of the looseness of parseInt, but it then starts allowing trailing junk characters. The reasoning behind this choice is not clear. And it seems to depart from the intuition that this is supposed to be an inverse of toString, which never produces trailing junk.
I'd suggest a SyntaxError for those cases too.