11 lines
333 B
HTML
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> |