The name property sets or gets the name of an error.
The following code has a wrong function name.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> try {/*w w w. j av a2s .c om*/ notExistFunction("Welcome guest!"); } catch(err) { document.getElementById("demo").innerHTML = err.name; } </script> </body> </html>