FrontendArk

Master Frontend Interviews

  • Practice
  • Playground
  • Resource
Medium

Dice Roller

20 mins

Build a dice roller app that simulates rolling a 6-sided dice.

Requirements:

  1. Display the current dice result (1–6).
  2. Add a "Roll" button that generates a random number between 1 and 6.
  3. Update the displayed result when the dice is rolled.
  4. (Bonus) Show a dice emoji 🎲 or number image for a more visual result.

Code Editor

React Component

00:00
Loading...

Live Preview

See your React component