how to convert character to integer in js code example Example: convert a string to number in javascript var x = Number("1000")