<!DOCTYPE html> <html> <body> <h2>JavaScript Comparison</h2> <p>Assign 5 to x, and display the value of the comparison (x == 8):</p> <p id="demo"></p> <script> var x = 5; document.getElementById("demo").innerHTML = (x == 8); </script> </body> </html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter