← Back to Tutorials Chapter 14

Practice & Certification

Practice is the bridge between learning and mastery. This chapter provides quiz questions, coding challenges, a study plan, interview preparation tips, and certification paths to guide your next steps.

JavaScript Quiz Questions

Test your knowledge with these fundamental questions:

  1. What is the difference between == and ===?
    == compares values after type coercion; === compares both value and type without coercion.
  2. What does let vs const vs var mean?
    var is function-scoped; let and const are block-scoped. const prevents reassignment.
  3. How does prototypal inheritance work?
    Objects inherit properties from other objects via the prototype chain. Object.create() and class syntax both use prototypes.
  4. Explain the event delegation pattern.
    Attach a single event listener to a parent instead of many listeners to each child. Use e.target to determine which child triggered the event.
  5. What is a closure?
    A function that retains access to its outer scope even after the outer function has returned.

Exercises by Difficulty

Beginner

Intermediate

Advanced

JavaScript learning roadmap

Bootcamp-Style Curriculum

If you prefer a structured approach, here is an 8-week study plan:

WeekTopics
1Variables, data types, operators, conditionals
2Loops, functions, arrays, objects
3DOM manipulation, events, forms
4ES6 features, classes, modules
5Asynchronous JS: callbacks, promises, async/await
6AJAX, Fetch API, JSON, REST APIs
7Canvas, SVG, and project work
8Review, interview prep, portfolio building

Interview Preparation

Common interview topics include: closures, hoisting, the event loop, this binding, prototypal inheritance, promises, scope, and performance optimisation. Practice explaining these concepts aloud and writing solutions on a whiteboard or plain text editor.

// Common interview question: Flatten a nested array
function flatten(arr) {
  return arr.reduce((acc, item) =>
    acc.concat(Array.isArray(item) ? flatten(item) : item), []);
}
console.log(flatten([1, [2, [3, [4]]]])); // [1, 2, 3, 4]
Tip: Understand the event loop, microtasks vs macrotasks, and how setTimeout(fn, 0) defers execution. This is one of the most frequently tested concepts in JavaScript interviews.

Certification Paths

Exercise: Build Your Portfolio

Create a single-page portfolio site that showcases three JavaScript projects you have built. Include a project title, a brief description, a screenshot or live demo link, and a link to the source code on GitHub. Style it with CSS and make it responsive.