Online HTML Editor
Javascript Online Compiler
index.html
Change Theme
Compress code
Uncompress code
Download Code
Clear Code
Copy Code!
RunĀ
Click to run or ctrl+s
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Javascript - if statement</title> </head> <body> <h2>if statement executes when condition is true.</h2> <p>Check console. Press <kbd>F12</kbd>.</p> <script> let x = 10; if (x == 10) { console.log("Statement is true, x = 10"); } </script> </body> </html>
RunĀ