adplus-dvertising
frame-decoration

Question

Consider the following code snippet :

var string2Num=parseInt("123xyz");

The result for the above code snippet would be :

a.

123

b.

123xyz

c.

Exception

d.

NaN

Posted under JavaScript

Answer: (b).123xyz

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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