Skip to content

Instantly share code, notes, and snippets.

View tasgmaia's full-sized avatar

Jonatas Guerci Maia tasgmaia

View GitHub Profile
function sus(...answers) {
let soma = 0;
for (let indice = 0; indice < answers.length; indice++) {
if (indice % 2 === 0) {
soma += answers[indice] - 1;
} else {
soma += 5 - answers[indice];
}
}
return (soma * 2.5);