Skip to content
Random hockey player generator, selects a random player from a given team
CSS HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Single page Vanilla JS application that utilizes the NHL REST API to get the latest rosters for the hockey teams, then chooses a random player for the selected team.

What's the point of this?

I wanted to play a hockey-related drinking game where people were assigned random players and if they scored, assisted or let a goal in then they would drink. Perhaps someone else will find some use for it, we found it fun :)

Built with

  • Vanilla JS
  • Fetch API with chained promises
  • NHL Rest API

How it works

Fetch requests to the NHL API to get roster information. Get the length of the team and pick a random player in the team until all players are chosen.


  • Players are not duplicated
  • DOM Message notifying when player has picked all players on team


NHL API unofficial documentation

You can’t perform that action at this time.