Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (7 sloc) 372 Bytes

Create a JavaScript Slot Machine

For this we have to generate three random numbers using the formula they give us and not the general one. Math.floor(Math.random() * (3 - 1 + 1)) + 1;

slotOne = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
slotTwo = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
Something went wrong with that request. Please try again.