JSFiddle - React, Tailwind, and code Playground

by Brock Callahan

JavaScript

function duckDuckGoose(players, goose) {
  while(goose > players.length) { 
    goose -= players.length;
  };
  return players[goose - 1].name;
}