Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h2>Using eval()</h2> <h3>For security reasons, eval() is not allowed to create variables in the scope from which it was called.</h3> <p>Activate debugging in your browser (F12) to see the error report.</p> <script> eval ("let x = 2"); alert (x); // This will cause an error </script> </body> </html>