Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript SyntaxError</title> </head> <body> <script> try { eval("alert('Hello World!)"); // throws a syntax error (missing bracket) } catch(e) { document.write(e.name + ": " + e.message); } </script> </body> </html>