17 Replies

but in the console I get this message:

my js file
can I get some idea to solve this problem
thanks
document.body.main doesn't exist. What are you trying to do?
from the three pixels at the top of your second screenshot, I think there's a <time> tag there?
you probably want to use
document.querySelector('time').datetime
;GitHub
Piscine_JS/JS/js01/ex00.md at master · issamelferkh/Piscine_JS
Contribute to issamelferkh/Piscine_JS development by creating an account on GitHub.
you see
????
"The datatime attribute of the HTML time element is displayed in ISO format.
querySelector is not yet available. Try using the tree structure of the DOM as in the example below.
document.body.main.time.datetime;"
not sure what to tell you, document.body.main isn't a thing

I don't know what that document you linked is, but querySelector has been a thing for years now. Even if that didn't exist,
document.getElementsByTagName('time')[0]
would workit an exercise
i m just going to remove it
thanks for your answer
no worries
he new code:
now I get this error:

I think it's toLocaleString
thanks I m so stupid sometimes
you don't want to know how much time I've wasted on typos like that over the years 🤣
😆