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 id="demo"></h1> <script> function renderApp() { document.getElementById("demo").innerHTML = "Welcome!"; } function renderLogin() { document.getElementById("demo").innerHTML = "Please log in"; } let authenticated = true; authenticated ? renderApp() : renderLogin(); </script> <p>Try changing the "authenticated" variable to false, and run the code to see what happens.</p> </body> </html>