<html>
<body>
<h2>JavaScript Dates</h2>
<p>toString() returns a date object as a string:</p>
<p id="demo"></p>
<script>
const d = new Date();
let text = d.toString();
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>