Skip to content

Instantly share code, notes, and snippets.

@fqjony
Created July 15, 2022 09:36
Show Gist options
  • Select an option

  • Save fqjony/0619eebee84c0fe0ba3e1aabb85de2f6 to your computer and use it in GitHub Desktop.

Select an option

Save fqjony/0619eebee84c0fe0ba3e1aabb85de2f6 to your computer and use it in GitHub Desktop.
function getDrinks(numberOfGuests) {
let sum = 0;
for (let i = 1; i <= numberOfGuests; i++) {
sum = sum + i;
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment