Skip to content

Instantly share code, notes, and snippets.

View Denaag's full-sized avatar

Denaag

View GitHub Profile
@natafaye
natafaye / boggle.js
Created July 6, 2022 03:46
7/5/22 - JS Week 6
class Die {
constructor(letters) {
this.topLetter = letters[0];
this.allLetters = letters;
}
roll() {
const randomIndex = Math.floor(Math.random() * this.allLetters.length)
this.topLetter = this.allLetters[randomIndex];
}