set13

Build a list of placeholders for n table rows

13 / 26
read the snippet · pick its Big-O
function buildRows(n) {
const rows = [];
for (let i = 0; i < n; i++) {
rows.push({ id: i, status: 'pending' });
}
return rows;
}