A gamified sport and diet tracking Progressive Web App built for the Advanced Interactive Utility Website project. Track workouts, log meals, set goals, earn badges, and level up every day.
| Feature | Where Used | Exam Objective |
|---|---|---|
let, const | Throughout script.js — state, user, token, XP_TABLE | Variables & primitive data types |
| Number, Boolean, String primitives | XP calculations, active flags, email/username strings | Primitive data types |
parseInt(), parseFloat() | Parsing form inputs for workouts, diet entries, goals | Type conversion |
| Arithmetic operators (+, -, *, /, %) | XP calculations, calorie totals, streak logic, chart % | Assignment & arithmetic operators |
Math.round(), Math.min(), Math.max(), Math.pow(), Math.floor(), Math.random() | XP curve, progress percentages, level-up messages | Built-in Math functions |
if / else statements | Auth checks, XP bonuses, streak logic, UI state | Decision statements |
for loops, forEach, map, filter, reduce | XP level table, list rendering, stats aggregation | Loops |
&&, ||, ! | Auth guards, null coalescing, form validation | Logical operators |
| Functions with parameters + return values | api(), toast(), escHtml(), workoutCard(), levelForXp() | Functions, parameters, return values |
| Local vs global scope | Module pattern, state object, closures in event handlers | Scope rules |
Arrays: push(), length, iteration | state.workouts, pagesVisited, badgeQueue, XP_TABLE | Arrays |
| Objects | state object, user objects, ACTIVITY_ICONS map | Objects |
Date object | Greeting logic, chart dates, session timestamps | Date object |
getElementById(), querySelector() | Throughout DOM manipulation | DOM manipulation |
innerHTML, textContent | Rendering workout cards, badge lists, stats | DOM manipulation |
| onclick, onchange, DOMContentLoaded, keydown | All form submissions, nav clicks, modal close | Event handling |
try...catch blocks | Every API call, service worker, token validation | Exception handling |
console.log() | Boot message listing all JS features used | Debugging |
| Comments & indentation | Consistent throughout all files | Best practices |
Built with HTML, CSS & JavaScript for the Advanced Interactive Utility Website project.
Go to FitQuest →