Logo
roastdev
📌 Roll the Fun: Building an Interactive Dice with TailwindCSS and ReactJS

Up until now, whenever I had to create a dice roll, I’d just reach for Math.random() multiply it by 6, add 1, and wrap it in Math.floor() to get a whole number between 1 and 6. Simple and done.Something like this:
â›¶const rollDice = () => Math.floor(Math.random() * 6) + 1;Functional Yes,
Exci...

🔗 Подробнее: https://www.roastdev.com/p...
25 days ago

No replys yet!

It seems that this publication does not yet have any comments. In order to respond to this publication from roastdev , click on at the bottom under it