17 Replies
![No description](https://cdn.answeroverflow.com/1195006575774019675/b.jpg)
but in the console I get this message:
![No description](https://cdn.answeroverflow.com/1195006713745657936/cccc.jpg)
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
![No description](https://cdn.answeroverflow.com/1195009029609631834/image.png)
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:
![No description](https://cdn.answeroverflow.com/1195011512172036166/wwwwwwwww.jpg)
I think it's toLocaleString
thanks I m so stupid sometimes