M
Size: a a a
M
SS
SS
OA
SS
OA
OA
SS
OA
M
O
OD
SS
O
js
function countPoints(gameResults) {
let total = 0;
for (const [one, , two] of gameResults) {
switch (true) {
case one > two:
total += 3;
break;
case one === two:
total += 1;
break;
}
}
return total;
}
js
function countPoints(gameResults) {
return gameResults.reduce((total, [one, , two]) => {
if (one > two) return total + 3;
if (one === two) return total + 1;
return total;
}, 0);
}
L
O
js
function countPoints(gameResults) {
let total = 0;
for (const [one, , two] of gameResults) {
switch (true) {
case one > two:
total += 3;
break;
case one === two:
total += 1;
break;
}
}
return total;
}
js
function countPoints(gameResults) {
return gameResults.reduce((total, [one, , two]) => {
if (one > two) return total + 3;
if (one === two) return total + 1;
return total;
}, 0);
}
O
OB
T