🌍 Frontend Web Development · subject

Frontend Web Development JavaScript Programming Syllabus

The JavaScript Programming syllabus for Frontend Web Development in full: 7 chapters and 30 topics, every one listed below, plus 51 JavaScript Programming flashcards with answers.

7Chapters
30Topics
51Flashcards

JavaScript Programming syllabus: all 7 chapters

Expand any chapter to see its topics and sub-topics.

  1. JavaScript Basics

    5 topics
    • Variables, let, const & Scope
    • Data Types & Type Coercion
    • Operators & Expressions
    • Conditionals & Loops
    • Functions & Arrow Functions
  2. Data Structures

    4 topics
    • Arrays & Array Methods
    • Objects & Property Access
    • Destructuring & Spread/Rest
    • Maps, Sets & JSON
  3. Functions & Scope in Depth

    4 topics
    • Closures & Lexical Scope
    • The this Keyword & Binding
    • Higher-Order Functions & Callbacks
    • Hoisting & Execution Context
  4. Objects, Prototypes & Classes

    4 topics
    • Prototypal Inheritance
    • ES6 Classes & Inheritance
    • Getters, Setters & Static Members
    • Modules (import / export)
  5. DOM Manipulation

    4 topics
    • Selecting & Traversing Elements
    • Creating & Modifying Nodes
    • Event Handling & Delegation
    • Forms & Browser Events
  6. Asynchronous JavaScript

    5 topics
    • Callbacks & the Event Loop
    • Promises & Chaining
    • async / await
    • Fetch API & HTTP Requests
    • Error Handling (try/catch)
  7. Browser APIs & Storage

    4 topics
    • Local Storage & Session Storage
    • Cookies & IndexedDB
    • Geolocation, History & URL APIs
    • Web Workers & Timers

Frontend Web Development JavaScript Programming flashcards — 51 questions with answers

  1. What is the key difference between `var`, `let`, and `const` regarding scope?

    `var` is function-scoped (or global), while `let` and `const` are block-scoped (limited to the nearest `{ }`). `const` also prevents reassignment of the binding.

  2. Does `const` make an object immutable?

    No. `const` only prevents reassignment of the variable binding. The object's properties can still be mutated (e.g., `obj.x = 1` works, but `obj = {}` throws).

  3. What is the Temporal Dead Zone (TDZ)?

    The period between entering a block scope and the actual declaration of a `let`/`const` variable. Accessing the variable in the TDZ throws a `ReferenceError`, even though it is hoisted.

  4. List the seven primitive data types in JavaScript.

    `string`, `number`, `bigint`, `boolean`, `undefined`, `symbol`, and `null`. Everything else is an `object`.

  5. What does `typeof null` return, and why is it notable?

    It returns `"object"`. This is a long-standing bug in JavaScript kept for backward compatibility; `null` is actually a primitive.

  6. What is the difference between `==` and `===`?

    `==` (loose equality) performs type coercion before comparing, while `===` (strict equality) compares both value and type with no coercion. Prefer `===` to avoid surprises.

  7. What do the following coerce to as booleans (falsy values)?

    The eight falsy values are: `false`, `0`, `-0`, `0n`, `""` (empty string), `null`, `undefined`, and `NaN`. Everything else is truthy.

  8. What is the result of `"5" + 3` versus `"5" - 3` in JavaScript?

    `"5" + 3` yields `"53"` (string concatenation, because `+` favors strings), while `"5" - 3` yields `2` (the `-` operator coerces the string to a number).

  9. What is the difference between `null` and `undefined`?

    `undefined` means a variable has been declared but not assigned a value; `null` is an explicit assignment representing 'no value'. `null == undefined` is `true`, but `null === undefined` is `false`.

  10. What does the nullish coalescing operator `??` do, and how does it differ from `||`?

    `a ?? b` returns `b` only when `a` is `null` or `undefined`. `a || b` returns `b` for any falsy `a` (including `0` and `""`), making `??` safer for defaults.

  11. What is the difference between the equality operators used and the ternary operator's syntax?

    The ternary (conditional) operator has the form $condition\ ?\ exprIfTrue\ :\ exprIfFalse$. It is the only JavaScript operator taking three operands.

  12. How does short-circuit evaluation work with `&&` and `||`?

    `&&` returns the first falsy operand (or the last if all truthy); `||` returns the first truthy operand (or the last if all falsy). Evaluation stops as soon as the result is determined.

  13. What is the difference between a `for...of` loop and a `for...in` loop?

    `for...of` iterates over the values of an iterable (arrays, strings, Maps, Sets). `for...in` iterates over the enumerable property keys (names) of an object, including inherited ones.

  14. What does the `break` statement do versus `continue` in a loop?

    `break` immediately terminates the entire loop; `continue` skips the rest of the current iteration and proceeds to the next one.

  15. What is the difference between a function declaration and a function expression regarding hoisting?

    Function declarations are fully hoisted, so they can be called before they appear in code. Function expressions (assigned to a variable) are not; only the variable is hoisted.

  16. How do arrow functions differ from regular functions in handling `this`?

    Arrow functions do not have their own `this`; they lexically inherit `this` from the enclosing scope. Regular functions bind `this` based on how they are called.

  17. Do arrow functions have their own `arguments` object?

    No. Arrow functions lack their own `arguments` object; referencing `arguments` inside one refers to the enclosing function's `arguments` (or throws if none). Use rest parameters `(...args)` instead.

  18. What is a default parameter, and when is its value applied?

    A default parameter provides a fallback value used only when the argument is `undefined` (or omitted). Example: `function f(x = 10) {}` gives `x` the value `10` when called as `f()` or `f(undefined)`.

  19. Which array methods mutate the original array versus return a new one?

    Mutating: `push`, `pop`, `shift`, `unshift`, `splice`, `sort`, `reverse`. Non-mutating (return new/copy): `map`, `filter`, `slice`, `concat`, `reduce`.

  20. What does `Array.prototype.map()` do?

    It creates a new array of the same length by applying a callback to each element and collecting the returned values. It does not mutate the original array.

Show the other 31 JavaScript Programming flashcards
  1. What is the difference between `filter()` and `find()`?

    `filter()` returns a new array of all elements matching the predicate. `find()` returns the first single element that matches (or `undefined` if none).

  2. How does `Array.prototype.reduce()` work?

    It reduces an array to a single value by applying `(accumulator, currentValue) => newAccumulator` for each element. Syntax: `arr.reduce(callback, initialValue)`. If no initial value is given, the first element is used as the seed.

  3. What is the difference between `slice()` and `splice()`?

    `slice(start, end)` returns a shallow copy of a portion without mutating. `splice(start, deleteCount, ...items)` mutates the array by removing/inserting elements and returns the removed elements.

  4. What are the two common ways to access object properties?

    Dot notation (`obj.key`) and bracket notation (`obj["key"]`). Bracket notation is required when the key is dynamic, stored in a variable, or not a valid identifier.

  5. What does the optional chaining operator `?.` do?

    It safely accesses nested properties, short-circuiting to `undefined` if a reference is `null` or `undefined` instead of throwing. Example: `user?.address?.city`.

  6. What is the difference between `Object.keys()`, `Object.values()`, and `Object.entries()`?

    `Object.keys(obj)` returns an array of property names; `Object.values(obj)` returns an array of values; `Object.entries(obj)` returns an array of `[key, value]` pairs.

  7. How do you check whether an object has a property as its own (not inherited)?

    Use `Object.hasOwn(obj, 'key')` (modern) or `obj.hasOwnProperty('key')`. The `in` operator, by contrast, also returns `true` for inherited properties.

  8. What is object destructuring, and how do you rename a property during it?

    Destructuring extracts properties into variables: `const { a, b } = obj`. Rename with a colon: `const { a: x } = obj` assigns `obj.a` to a variable named `x`.

  9. What is the difference between the spread operator and rest parameters (both `...`)?

    Spread expands an iterable/object into individual elements (`[...arr]`, `{...obj}`, `f(...args)`). Rest collects multiple elements into a single array/object (`function f(...args)`, `const [a, ...rest] = arr`).

  10. Does the spread operator create a deep or shallow copy?

    A shallow copy. `{...obj}` or `[...arr]` copies only the top level; nested objects/arrays are still shared by reference.

  11. How do you set a default value while destructuring?

    Assign with `=`: `const { x = 5 } = obj` gives `x` the value `5` when `obj.x` is `undefined`. Works similarly for arrays: `const [a = 1] = []`.

  12. What is the difference between a `Map` and a plain object?

    A `Map` allows keys of any type (including objects/functions), maintains insertion order, has a `size` property, and is directly iterable. Object keys are coerced to strings/symbols.

  13. What guarantee does a `Set` provide, and how do you check membership?

    A `Set` stores only unique values (no duplicates). Check membership with `set.has(value)`; add with `set.add(value)`; get count with `set.size`.

  14. What do `JSON.stringify()` and `JSON.parse()` do?

    `JSON.stringify(value)` converts a JavaScript value into a JSON string; `JSON.parse(text)` converts a JSON string back into a JavaScript value.

  15. What happens to `undefined`, functions, and symbols during `JSON.stringify()`?

    In an object, properties with `undefined`, function, or symbol values are omitted. In an array, they are converted to `null`.

  16. What is a closure?

    A closure is a function bundled with references to its surrounding lexical environment, allowing it to access variables from an outer scope even after that outer function has returned.

  17. What is lexical scope?

    Lexical (static) scope means a variable's accessibility is determined by where it is written in the source code (the nesting of functions/blocks), not by where or how a function is called at runtime.

  18. How does the `this` keyword behave in a regular function called as a standalone function (non-strict vs strict mode)?

    In non-strict mode, `this` defaults to the global object (`window`/`globalThis`). In strict mode, `this` is `undefined`.

  19. What do `call`, `apply`, and `bind` do?

    All set `this` explicitly. `call(thisArg, arg1, arg2)` invokes immediately with args listed; `apply(thisArg, [args])` invokes immediately with args as an array; `bind(thisArg)` returns a new function with `this` permanently bound.

  20. When a method is called as `obj.method()`, what is `this`?

    `this` is the object to the left of the dot at call time (`obj`). Note this is dynamic: extracting the method and calling it standalone loses that binding.

  21. What is a higher-order function?

    A function that takes one or more functions as arguments and/or returns a function. Examples include `map`, `filter`, `reduce`, and `setTimeout`.

  22. What is a callback function?

    A function passed as an argument to another function, to be invoked ('called back') later — either synchronously (e.g., `map`) or asynchronously (e.g., event handlers, `setTimeout`).

  23. What is hoisting, and how are `var` and function declarations affected?

    Hoisting moves declarations to the top of their scope during compilation. `var` declarations are hoisted and initialized to `undefined`; function declarations are hoisted with their full body. `let`/`const` are hoisted but uninitialized (TDZ).

  24. What are the two phases of the JavaScript execution context?

    The creation (memory allocation/hoisting) phase, where variables and functions are set up, and the execution phase, where code runs line by line and values are assigned.

  25. What is prototypal inheritance?

    Objects inherit properties and methods from another object (their prototype) via the prototype chain. When a property isn't found on an object, JavaScript looks up its `[[Prototype]]` (accessible as `Object.getPrototypeOf(obj)` or `__proto__`).

  26. What is the difference between `__proto__` and `prototype`?

    `prototype` is a property on constructor functions used to build the prototype of instances they create. `__proto__` (or `[[Prototype]]`) is the internal link on every object pointing to its actual prototype.

  27. How do ES6 classes implement inheritance, and what does `super` do?

    A subclass uses `class B extends A`. `super(...)` calls the parent constructor (required before using `this` in the subclass constructor), and `super.method()` calls a parent method.

  28. What is the difference between an instance method and a `static` member in a class?

    Instance methods are called on instances (`obj.method()`) and live on the prototype. `static` members belong to the class itself (`ClassName.method()`) and are not accessible from instances.

  29. What are getters and setters in a class or object?

    Accessor properties defined with `get` and `set` keywords. A getter runs when the property is read (`obj.x`); a setter runs when it is assigned (`obj.x = v`). They let you compute or validate values while using property syntax.

  30. What is the difference between a named export and a default export in ES modules?

    A module can have many named exports, imported with braces and matching names: `import { a, b } from './m'`. It can have only one default export, imported without braces under any name: `import x from './m'`.

  31. What is the difference between `querySelector()` and `querySelectorAll()`, and how do you traverse to a parent or children?

    `querySelector(sel)` returns the first matching element (or `null`); `querySelectorAll(sel)` returns a static `NodeList` of all matches. Traverse with `.parentElement`, `.children`, `.nextElementSibling`, and `.closest(sel)`.

Frontend Web Development JavaScript Programming FAQ

What is in the Frontend Web Development JavaScript Programming syllabus?

Frontend Web Development JavaScript Programming is split into 7 chapters: JavaScript Basics, Data Structures, Functions & Scope in Depth, Objects, Prototypes & Classes, DOM Manipulation, Asynchronous JavaScript and Browser APIs & Storage. Together they contain 30 topics.

How many chapters are in Frontend Web Development JavaScript Programming?

7 chapters, containing 30 topics. The largest chapter is JavaScript Basics, with 5 topics.

Are there flashcards for Frontend Web Development JavaScript Programming?

Yes — a 51-card JavaScript Programming deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.