ExamVeda
Login
Home
This question belongs to Javascript Array And Function
Array and Function
?

Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :

Answer & Solution
Correct Answer: Option B
The parseInt() function returns the first integer contained in the string or 0 if the string does not begin with an integer.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Mounika Karikati
Mounika Karikati 5 years ago
what is the output of parseInt(123xy); ?