December 2013
Intermediate to advanced
384 pages
9h 54m
English
var n=16; var a = n.toString(); //a = 16 var b = n.toString(16); //b = 10
To convert a number to a string in JavaScript, create a variable with the numerical value if you don’t already have one and then call .toString(radix) on the number. The optional radix parameter specifies the base to use when converting the number. You can specify base 2 up to base 36.
Read now
Unlock full access