How to put multiple objects in an empty array

how do I put multiple objects in an empty array? It doesn"t seem to work with push? Ask for advice

Mar.20,2021

what is the wrong way? Show me the code?


push cannot be separated by commas?


let arr = []
for(let i = 0; i < 5; iPP) {
    arr.push({name: 123})
}

No?

Menu