Number string to number in JS
$ node
> a = "10"
'10'
> a = +a
10
> a = "-10.9";
'-10.9'
> a = +a;
-10.9
Written by Tony612
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#