Skip to content
engineering workbench.by StudyPort Academy
All projects
Beginner25 min

Guess the number

Use the original guessing and scoring logic in a keyboard-friendly form.

ConditionalsRandomnessState

YOUR BUILD CHECKLIST

  1. Follow r_100 from generation to comparison.
  2. Submit high and low guesses and inspect the console.
  3. Find the target and verify the count-based score.
Editable original
Opening editor…
LIVE PREVIEW
Console 0

Your console output appears here.

Saved on this deviceJavaScript · ES2022
Notes on this source port
  • Port the exact r_100, user, count, comparison branches, and scoring into a submit listener instead of a blocking prompt/do-while loop.

Make it your own

The original works. These are your next experiments.

  • Add a restart control.
  • Use Math.floor for a uniform integer distribution.
Open a fresh playground