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> <h1>The JavaScript <i>this</i> Keyword</h1> <p>In this example, <b>this</b> refers to the window object:</p> <p id="demo"></p> <script> "use strict"; let x = this; document.getElementById("demo").innerHTML = x; </script> </body> </html>