Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Get the Current Date and Time</title> </head> <body> <script> let now = new Date(); document.write(now); // Display the current date and time </script> </body> </html>