Answer the question
In order to leave comments, you need to log in
How to load 4 objects?
I have an array of 24 objects, but only the first 8 are displayed, the rest should be loaded in 4 pieces when the (View more) button is pressed, how to implement this correctly?
let kitchenList = document.querySelector('.type-wardrobe');
let buttonMore = document.getElementById("btnMore");
let maxItems = 8;
function outputKitchens() {
for (let i = 0; i < maxItems; i++) {
let kitchenItem = document.createElement('li');
kitchenItem.classList.add('type');
kitchenList.append(kitchenItem);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question