<body>
<h4>The day of the week in numerical form:</h4>
<p id="demo"></p>
<h4>The day of the week spelled out:</h4>
<p id="days"></p>
<script>
var d = new Date(); //NUMERICAL FORM
document.getElementById("demo").innerHTML = d.getDay();
var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
document.getElementById("days").innerHTML = days[d.getDay()];
</script>
</body>
|
The day of the week in numerical form:
The day of the week spelled out:
|