Run_probelm_javascript

Hi,
When i run the last of my code, leo doesn’t appear on my Webview.what’s the problem in your opinion? Thanks a lot

Welcome to the forums!

You’ve misspelled innerHTML, you missed the r.

2 Likes


Even with the ‘r’ it doesn’t work

Now you’ve accidentally duplicated the ending, instead of innerHTML, you’ve got innerHTMLHTML.

Line 19 should be yourPlayground.innerHTML = '<h1>Leo</h1>';.

1 Like


Still doesn’t work

I’m thinking your repl is this one? https://replit.com/@salimakki/FORK-THIS-JavaScript-Course-by-Clever-Programmer if not please post the correct URL as this lets others in the community suggest ideas.

When I fork your repl and run the code there are errors. Opening the webview in a new tab and using web tools/inspect (F12) shows this:

image

To resolve the error you need to set up what yourPlayground refers to e.g.

yourPlayground = document.documentElement
yourPlayground.innerHTML='<h1>Leo</h1>'
3 Likes

you can prevent such implicit mistakes by using TypeScript

2 Likes