Mod edit: solution code removed
Hi, @razit44mhj, thanks for your question. It seems there is a typo in your code, the correct function of document object to get element by id is getElementByID(string)
- with capital ID.
Correct code would then be:
var text = document.getElementByID('text');
text.innerText = "You enter the store.";
Hope this gets you moving forward again
Have a nice day!
Thanks for the correction
although this code runs perfectly.
I just post the Answer for step45
Glad to hear that, I’ll be happy if you mark my reply as the solution
You both have incorrect code, the method is getElementById
not getElementByID
Also, the element is already in the code on line 12.
const text = document.querySelector("#text");
I have deleted the code in the first post and left the second blurred. We do not allow solution code to be posted, so even if it is wrong we can’t allow it if it passes the tests. In this case, the challenge is passing with the wrong method name, which might be seen as a bug as it really should throw an error.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.