HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Try to change "sea = blue" to "sea = green"</p> <p id="point"></p> <script> var x = document.getElementById("point"); var sea = "blue"; var txt = ""; if(sea == "green") txt = "Sea is green in color"; else if(sea == "blue") txt = "Sea is blue in color"; else txt = "Sea is white in color"; x.innerText = txt; </script> </body> </html>
OUTPUT
×

Save as Private