1.

What will be the radix value of the parseInt()method when the string begins with any other value other than 0x and 0?(a) 8(b) 9(c) 10(d) 11The question was asked during an internship interview.My enquiry is from Parsing Values using JavaScript topic in portion Parsing, Benchmarking and Logging of JavaScript

Answer»

Right option is (c) 10

To elaborate: The radix value will be 10 when the STRING of the method parseInt() begins with any other value other than 0X and 0. If the string begins with 0x, then the radix value will be 16.



Discussion

No Comment Found

Related InterviewSolutions