Javascript examples for DOM:Error
JavaScript Error name Property - RangeError, A number "out of range" has occurred
<!DOCTYPE html> <html> <body> <p>You cannot set the number of significant digits of a number to 500:</p> <p id="demo"> <script> var num = 1;//from w w w .ja v a 2 s . c om try { num.toPrecision(500); } catch(err) { document.getElementById("demo").innerHTML = err.name; } </script> </body> </html>