Write a JavaScript Program to find the Current Date and Time.
- The Tech Platform
- Jun 13, 2021
- 1 min read
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:

Source: W3School
The Tech Platform
Comentários