Skip to content

Instantly share code, notes, and snippets.

@ethanstenis
Created July 13, 2017 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanstenis/44977956047bd268128a21477880ba41 to your computer and use it in GitHub Desktop.
Save ethanstenis/44977956047bd268128a21477880ba41 to your computer and use it in GitHub Desktop.
This is the solution to Codewars' Duck, Duck, Goose KATA (JS)
function duckDuckGoose(players, goose) {
return players[(goose-1) % players.length].name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment