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.
Test your knowledge with these fundamental questions:
== and ===? == compares values after type coercion; === compares both value and type without coercion.let vs const vs var mean? var is function-scoped; let and const are block-scoped. const prevents reassignment.Object.create() and class syntax both use prototypes.e.target to determine which child triggered the event.Array.prototype.map() from scratch.If you prefer a structured approach, here is an 8-week study plan:
| Week | Topics |
|---|---|
| 1 | Variables, data types, operators, conditionals |
| 2 | Loops, functions, arrays, objects |
| 3 | DOM manipulation, events, forms |
| 4 | ES6 features, classes, modules |
| 5 | Asynchronous JS: callbacks, promises, async/await |
| 6 | AJAX, Fetch API, JSON, REST APIs |
| 7 | Canvas, SVG, and project work |
| 8 | Review, interview prep, portfolio building |
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]
setTimeout(fn, 0) defers execution. This is one of the most frequently tested concepts in JavaScript interviews.
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.