set03

Total up an order

3 / 26
read the snippet · pick its Big-O
function orderTotal(items) {
let total = 0;
for (const item of items) {
total += item.price * item.qty;
}
return total;
}