js/5/functiondate.html
2024-10-03 11:29:13 -05:00

11 lines
333 B
HTML

A function that prints the current date and time. Hint: you can
get the current date and time with new Date().
<html><body><script>
function datetime (){let t = Date();console.log(t)}
date = function () {let t = Date();console.log(t)}
d = () => {let t = Date();console.log(t)}
datetime()
date()
d()
</script></body></html>