Created
May 26, 2020 23:53
-
-
Save tasgmaia/5d7b3518bf22d4236f97f704ef0f22b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment