loop

  for (let i = 0; i < 3; i++) {

var data = ‘<div class=”row”>’;
for (let j = 1; j < 5; j++) {
data += ‘<div class=”col-sm-‘ + j + ‘”>’;
data += `<div class=”card” style=”width: 18rem;”>
<img src=”…” class=”card-img-top” alt=”…”>
<div class=”card-body”>
<h5 class=”card-title”>Card title</h5>
<p class=”card-text”>Some quick example text to build on the card title and make up the bulk of the card’s content.</p>
<a href=”#” class=”btn btn-primary”>Go somewhere</a>
</div>
</div>`;
data += ‘</div>’;
}
data += ‘</div>’;
data += data;
}
// console.log(data)
document.getElementById(“datashow”).innerHTML = data;
</script>

Leave a Comment

Your email address will not be published. Required fields are marked *