Wednesday, 21 November 2012

Convert String to Integer : Like parseInt() in java

var a=3;
var b='6';

var c=a+parseInt(b);
alert("Sum:"+c);


Output:
Sum: 9
Reactions:

0 comments:

Post a Comment

Leave a comment on blog quality.

Blogger

Related Posts Plugin for WordPress, Blogger...