Skip to main content

Fix the loop that always reports the last numberfind the bug

HTML5andCSS3 logoFIND THE BUG

Each button should report its own number, but every one of them currently shows 3. Fix the loop so button 1 reports 1, button 2 reports 2, and button 3 reports 3.

Acceptance criteria

  1. 1.Clicking the second button sets #chosen to 2.
  2. 2.Clicking the third button sets #chosen to 3.
  • Deloitte
  • Neerx Technovation
  • Photon Technologies
  • TO THE NEW
  • Zepto
  • DotStark Technologies
1
2
3
4
5
6
0 × 0

Output ready when you are

Press Run to render your code, or Submit to validate your solution.