Code:
<!DOCTYPE html>
<html>
<body>
<h2>Today's Date and Time using javascript</h2>
<p id="demo"></p>
<script>
const d = new Date();
document.getElementById("demo").innerHTML = d;
</script>
</body>
</html>
Output:
![](https://static.wixstatic.com/media/0f65e1_87cda9b9a59545c489d2a74ffa2084f0~mv2.png/v1/fill/w_76,h_32,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/0f65e1_87cda9b9a59545c489d2a74ffa2084f0~mv2.png)
Source: W3School
The Tech Platform