Javascript: Converting String to Number?

Posted by Warrantica on Stack Overflow See other posts from Stack Overflow or by Warrantica
Published on 2010-05-16T13:25:22Z Indexed on 2010/05/16 14:00 UTC
Read the original article Hit count: 160

Filed under:
|

Is there any way to convert a variable from string to number?

For example, I have

var str = "1";

Can I change it to

var str = 1;

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about variable