Ask coding questions

← Back to all posts
Why is all the code in the console not showing in the div?
VulcanWM

The code I wanted to show in the div is not fully showing. The code I want to show in the div is printed in the console.
The code I am using right now to change the HTML code in the div is below (also in the file script.js beginning from line 58).

Thanks in advance to anyone who helps

Voters
VulcanWM
Comments
hotnewtop
Coder100

You have to use of to loop arrays. in loops objects.

VulcanWM

now it's just showing undefined @Coder100

VulcanWM

okay i fixed the undefined part, but it's still showing the same thing @Coder100

Coder100

you never defined allcode so it became global
var allcode = ""; @VulcanWM

VulcanWM

I fixed that but it’s still showing all code weirdly @Coder100

Coder100

yeah cuz you wrote the code to all have the same class so they are all in the same place silly @VulcanWM

VulcanWM

I removed that but it still wasn’t working @Coder100