25
rated 0 times
[
29]
[
4]
/ answers: 1 / hits: 15507
/ 6 Years ago, fri, october 19, 2018, 12:00:00
i want to display a string as many times I have a generated variable. Therefore I'd like to do something like that, which doesn't work
var shower_total = 7; // this gets generated, but for simplification...
var uhrzeit = <p class='clock_item'>Foo</p>;
document.getElementById(uhrzeit_block).innerHTML =5*uhrzeit;
That's why I tried looping it but that doesn't work neither
document.getElementById(uhrzeit_block).innerHTML =
for(b=0, b <= shower_total; b++){
uhrzeit
};
What do I do wrong or what would be a possible - beginner-compatible - solution. Thanks!
More From » javascript