Skip to content
academia.sh

Course Intermediate

Objects and Functions in JavaScript

By the end of this course

Start course

01

Prototype Model

The prototype link and the property lookup chain, object-to-object inheritance patterns, class syntax's counterpart on the chain, property descriptors, and immutability techniques.

  1. 01 Object Prototype The prototype link every object carries, the order in which properties are searched through this link, the distinction between an own property and an inherited property, and where the chain ends.
  2. 02 Prototypal Inheritance The link constructor functions and the new operator set up, extending the prototype chain to two layers, type-query operations, and the link changing at runtime.
  3. 03 Class Syntax Class declaration's exact counterpart on the prototype chain, the static side's inheritance, method enumerability, and the real differences syntax brings.
  4. 04 Property Descriptors The writability, enumerability, and configurability flags a property carries alongside its value; accessor properties and copying that preserves descriptors.
  5. 05 Immutability Techniques The scope of freezing, sealing, and preventing extensions; the consequences of their staying shallow, deep freezing, and patterns for producing a new object instead of a change.

02

Context and Closures

The four rules of this binding, explicit binding operations, lexical context in arrow functions, carrying state with closures, and using a function as a value.

  1. 01 this Binding Context determined at the call site; the default, implicit, explicit, and constructor binding rules, their priority order, and a method detaching from its object.
  2. 02 call, apply, and bind Three operations that determine context at the call site, argument-passing forms, the function-borrowing pattern, partial application, and the identity cost of a permanent bond.
  3. 03 Context in Arrow Functions Arrow functions having no context of their own, lexical resolution, the absence of a constructor and prototype, the cost of arrows defined as class fields, and cases of misuse.
  4. 04 Closures The lifetime and sharing of closed-over variables, encapsulation through closures, comparing three constructions of the same kind, the loop-variable trap, and the memoization pattern.
  5. 05 Immediately Invoked Functions The spellings that turn a function declaration into an expression, scope isolation and the revealing module pattern, one-time setup, and comparison with block scope.
  6. 06 Higher-Order Functions Using a function as a value, the filter-map-reduce chain, functions that produce a comparator, composition, and behavior-adding wrappers.

03

Advanced Collections

Keyed and unique collections, weak references, the iteration protocol, lazy sequences with generators, typed arrays for binary data, and deep copying.

  1. 01 Map and Set The limits of using an object as a dictionary; a mapping type that preserves key identity, sets of unique values, and a comparison of the two setups on grouping.
  2. 02 Weak Collections Mapping and set types that do not prevent their keys from being collected, the pattern for attaching data to an object from outside, why they cannot be iterated, and weak references.
  3. 03 Iterators The iteration protocol's two contracts, making a type traversable through its prototype, the distinction between iterator and iterable, cleanup on early exit, and lazy production.
  4. 04 Generators Pausable functions, the generator object's place in the iteration protocol, endless sequences, delegation, two-way communication, and lazy pipelines.
  5. 05 Typed Arrays Fixed-size binary buffers and the typed views over them, overflow and clamping behavior, explicitly specifying byte order, and how typed arrays differ from ordinary arrays.
  6. 06 Structured Cloning The references shallow copying shares, the losses of copying through serialization, the scope of structured cloning, and a deep copy that preserves the prototype and descriptors.

Start typing to search.

↑↓ Esc navigate · open · close