flag-quiz
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v11View latest version
Identify country flags — play solo, compete on the leaderboard.
Live: https://kamalnrf-flag-quiz.val.run
GET /quiz?n=5 → 5 random flag questions with 4 options each
GET /quiz → 1 random question
GET /leaderboard → top 20 scores
POST /score → submit { name, score, total, speed_bonus, streak_best }
- 1 point per correct answer
- Up to 2 speed bonus points (faster = more)
- +1 streak bonus at 3+ consecutive correct
- 12-second timer per question
| Param | Description |
|---|---|
?n=10 | Number of questions (max 194) |
?limit=50 | Leaderboard entries to return |
- Emoji flags may render differently across platforms
- Leaderboard is global, no auth