JSFiddle - React, Tailwind, and code Playground

by bhupendra negi

HTML

<noscript>Browser not supports JS</noscript>
<body>
     <h2>  This scrtipt pops up message </h2> 
</body>

CSS

body {
    background-color: yellow;
}

JavaScript

alert("Welcome js" + "\n" + "Seesion 1");
if (confirm("Do you want to proceed")) {

    var name = prompt("Enter your Name");
    document.getElementsByTagName("body")[0].innerText = name + " are IN ";
    var d = new Date();
    var time = d.getHours();
    var x;

    if (time < 10) {
        x = "Good morning";
    } else if (time < 20) {
        x = "Good day";
    } else {
        x = "Good evening";
    }
    alert(x);





}