Home
<!DOCTYPE html> <html> <body> <h1>Demo: JavaScript + Operator</h1> <p id="p1"></p> <p id="p2"></p> <p id="p3"></p> <p id="p4"></p> <p id="p5"></p> <script> let a = 5, b = "Hello ", c = "World!", d = 10; document.getElementById("p1").innerHTML = a + b; document.getElementById("p2").innerHTML = b + c; document.getElementById("p3").innerHTML = a + d; document.getElementById("p4").innerHTML = b + true; document.getElementById("p5").innerHTML = c - b; </script> </body> </html>
Result: