JavaScript tutorial
Add behavior to the web and build applications.
Course contents
Programming fundamentals
JavaScript Variables
Use const and let for values.
JavaScript Functions
Write reusable logic.
JavaScript conditions and array loops
Filter values with strict comparisons and accumulate a total.
JavaScript map, filter, and reduce
Build a transformation pipeline without mutating the source.
JavaScript types, equality, and coercion
Know the primitive types, why === is safer than ==, and which values count as false.
JavaScript closures and scope
Use a function that remembers its surrounding variables, and see why let fixes the classic loop bug.
JavaScript destructuring, spread, and rest
Unpack objects and arrays into variables, copy with spread, and collect arguments with rest.
JavaScript string methods and regular expressions
Split, pad, replace, and extract parts of text with strings and regular expressions.
JavaScript promises, async, and await
Write asynchronous code that reads like synchronous code, and handle errors with try and catch.
Object-oriented programming
JavaScript classes and private fields
Protect instance state with a private class field.
JavaScript inheritance and overriding
Reuse initialization and specialize instance behavior.
JavaScript prototypes and class inheritance
See that classes are built on prototype chains, and extend one constructor from another.
JavaScript private fields, getters, and static members
Hide state with #private fields, expose it through a getter, and keep a counter on the class itself.
Data structures and algorithms
JavaScript binary search
Search a sorted numeric array with a shrinking interval.
JavaScript Map and Set
Count values and identify distinct entries.
JavaScript linked lists and iterators
Build a singly linked list class that can be looped over with for...of.
JavaScript stacks and queues
Use an array as a stack, and write a queue that does not shift the whole array on every removal.
JavaScript sorting and the default sort pitfall
Learn why [10, 9, 1].sort() is wrong, sort with comparators, and write a merge sort.
JavaScript binary search trees with a generator
Insert values, search, and produce the sorted order lazily with a recursive generator.
JavaScript graphs: BFS, DFS, and path existence
Store a graph as a Map of neighbour lists and search it breadth-first and depth-first.
Analysis of algorithms
Database systems
Operating systems
Computer networks
Software engineering
Information security
JavaScript: SHA-256 hashing and HMAC with node:crypto
Hash a message, authenticate it with a secret key, and compare tags in constant time.
JavaScript: storing passwords with scrypt and a salt
Derive a memory-hard hash from a password and a random salt, then verify a login attempt.
JavaScript: preventing XSS by escaping output
Turn special HTML characters into entities so user text is shown as text, never run as markup.