Dice Roller

Languages

Build a dice roller app that simulates the results of rolling a specified number of 6-sided dice.

Requirements

  • The user can specify the number of dice to roll using the input field and the value can be an integer between 1 to 12 inclusive.
  • Upon clicking the "Roll" button, the dice roll is simulated and the results are displayed.
  • The results of the dice roll should be displayed in rows of three.

The example below shows a potential result of rolling 6 dice.

Dice roller example

Source

This question is adapted from FrontendEval's Rolling Dice question.

The @ts-ignore Tee — Ship now, fix neverSponsor: SwagOverflow
The @ts-ignore Tee — Ship now, fix never

The ultimate dev hack — silencing TypeScript like it's your toxic ex. This neat white tee pays tribute to every engineer's favorite guilty pleasure: bypassing errors with a single line of denial. Clean, simple, and painfully relatable, it's perfect for TypeScript warriors who know that sometimes, you just gotta ship it.

Get yours now ->

The @ts-ignore Tee — Ship now, fix neverSponsor: SwagOverflow
The @ts-ignore Tee — Ship now, fix never

The ultimate dev hack — silencing TypeScript like it's your toxic ex. This neat white tee pays tribute to every engineer's favorite guilty pleasure: bypassing errors with a single line of denial. Clean, simple, and painfully relatable, it's perfect for TypeScript warriors who know that sometimes, you just gotta ship it.

Get yours now ->