<html>
<body>
<h1>JavaScript Dates</h1>
<h2>The new Date() Method</h2>
<p>new Date() creates a new date object with the current date and time:</p>
<p id="demo"></p>
<script>
const time = new Date();
document.getElementById("demo").innerHTML = time;
</script>
</body>
</html>