?
Consider the following code snippet :
Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :
var string2Num=parseInt("123xyz");
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.
Join the Discussion
Login to post a comment or share your explanation.
Login