Choose Category
document.write("The string 1245.31 converted is" + parseFloat("1245.31") + "<br>"); if( isNaN(parseFloat("test")) ){ document.write("Cannot convert test string to a number."); }