Step 45 answer: to modify your display text. Change the innerText property of the text to be "You enter the store."

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 :slight_smile:

Have a nice day!

1 Like

Thanks for the correction
although this code runs perfectly.
I just post the Answer for step45 :slight_smile:

Glad to hear that, I’ll be happy if you mark my reply as the solution :slight_smile:

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.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.