Skip to main content

JavaScript Fundamentals Check

Challenge on lesson: Checkpoint: JavaScript Foundations

Build a small analytics helper — each step uses a different foundation: 1. Write average(numbers) that RETURNS the mean of an array of numbers (empty array returns 0). 2. Write formatScore(name, score) that RETURNS a template-literal sentence like "Ada scored 91". 3. Write bestLearner(learners) that takes an array of { name, score } objects and RETURNS the whole object with the highest score. 4. checkReady() is provided — it returns a promise resolving to true. Write an async function announce() that awaits it and returns the string "ready" when true.

Difficulty: intermediate

Back to lesson: Checkpoint: JavaScript Foundations