I'm very new to HTML and javascript but I need to create a grid container of buttons in which the text displayed on the button is an element in a list. in other words, I need each button's text to be different from one another. I was thinking to use a for loop but I'm not sure that's the way to go. I started with making the text of all buttons similar but it still isn't working. any help or advice at this point will be greatly appreciated!!
.categories-buttons {
display: grid;
grid-template-columns: 80px 80px 80px 80px 80px;
}
.item {
padding: 10px;
}
<div class="categories-buttons">
<button id="demo" class="item"></button>
<script>
for (var i = 0; i < 20; i++) {
document.getElementById("demo")(7);
}
</script>
</div>