- Complete all empty functions/methods
- Use proper array methods and DOM manipulation
- Handle edge cases (invalid input, duplicates)
- Display game state visually
- Add event listeners for user interaction
- Implement
generateWinningNumber - Complete
shuffleusing the Fisher-Yates algorithm - Fill in all methods in the
Gameclass
- Set up event listeners for user actions
- Update the display for user guesses
- Show real-time feedback messages
- Implement game reset functionality
- Prevent non-numeric input
- Handle numbers out of range (1–100)
- Track and block duplicate guesses
- Use
Math.random()for generating random numbers - Arrays are 0-indexed
- Use
element.classListto add/remove CSS classes - Test edge cases like:
- Number
1and100 - Submitting a 5th guess
- Number
- To test your implementation against the specs, run:
npm install npm run test- This will install the needed packages and run Jasmine.
- Make sure all tests pass before submitting your assignment.
Deploy your game live for free in 2 minutes:
-
Push to GitHub
Make sure your code is committed and pushed to a GitHub repository. -
Deploy via Vercel:
- Go to vercel.com/new
- Click "Import Git Repository" and connect your GitHub account
- Select your game repository
- Click "Deploy" (no configuration needed!)
-
Access Live Demo:
Vercel will provide a URL like:
https://your-project-name.vercel.app