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>JavaScript Functions</h2> <p>In HTML the value of <b>this</b>, in a global function, is the window object.</p> <p id="demo"></p> <script> let x = myFunction(); function myFunction() { return this; } document.getElementById("demo").innerHTML = x; </script> </body> </html>