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