converting a string to an int in js code example Example: convert a string to number in javascript var x = Number("1000")