Thanks for your response. I guess I didn't phrase my question not appropriately. I am actually curious why JavaScript does not return NaN for invalid inputs? Since the name of the method contains "parse", I assume it would throw some parsing error if the inputs are invalid.
On Tuesday, October 15, 2019 at 12:20:18 PM UTC+2, [email protected] wrote: > > As the title says, is it a bug or is it implemented this way > intentionally? If the latter, I don't understand why a valid number should > be returned. > Another mysterious behavior is parseInt("1234fg",37) and > parseInt("1234fg",1) returns NaN as expected, but parseInt("1234fg",0) > returns 1234... > > > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/96f43c14-f89f-4523-9767-566f22d8828f%40googlegroups.com.
