+ 1

problem in display for loop

hey guys I have a problem that I receive just the least object in my browser but this runs true in the console! how can I resolve? https://code.sololearn.com/WeCw2bV6DwRJ/#

18th May 2020, 1:14 AM
Alireza Babaei
Alireza Babaei - avatar
3 ответов
+ 5
when we use innerHTML="something" all content is deleted, but we can use innerHTML+="something2" Replace in line 43 by: document.getElementById('text').innerHTML +="<hr>" +text;
18th May 2020, 2:08 AM
CoffeeByte
CoffeeByte - avatar
+ 3
In the last line of the for loop code block it should be += instead of =.
18th May 2020, 2:13 AM
ODLNT
ODLNT - avatar
0
ODLNT that's right
18th May 2020, 2:16 AM
CoffeeByte
CoffeeByte - avatar