javascript - parseInt'ing Infinity with a radix -
this question has answer here:
- why parseint(1/0, 19) return 18? 4 answers
i reading twitter when came across tweet said..
parseint(1/0,19); //18
of course, in js, divided 0 infinity
, radix
19 mean, , why infinity
radix 19 parsed 18?
other radix, such 16, or 10 (default) yield "nan"
, what's special radix 19?
upper-case letters used in bases above 10, , ninth letter of alphabet. thus, it's 1 less 19.
Comments
Post a Comment