mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-15 06:07:34 -05:00
428 B
428 B
title, localeTitle
| title | localeTitle |
|---|---|
| Create a JavaScript Slot Machine | Crie um caça-níqueis JavaScript |
Para isso, temos que gerar três números aleatórios usando a fórmula que eles nos dão e não o geral. 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;