Practice
Lessons
🔈
Settings
← All lessons
JavaScript
15s
30s
60s
2m
5m
∞
All JavaScript snippets
· 200
Every snippet has its own focus page with an explanation and the output it produces.
Variables
· 5
let vs const
const config
const mutation
var hoisting
var scope leak
Types
· 5
typeof operator
typeof null
implicit coercion
loose equality
explicit conversion
Operators
· 7
strict equality
logical operators
nullish coalescing
nullish defaults
optional chaining
nested access
logical assignment
Conditionals
· 4
if/else chain
ternary operator
switch statement
switch fallthrough
Loops
· 6
for loop
for...of loop
for...in loop
for...in arrays
while loops
break/continue
Functions
· 18
function hoisting
function expressions
arrow functions
arrow this
default params
rest params
IIFE pattern
higher-order functions
recursion
currying
curried pipeline
pipe/compose
data pipeline
once function
debounce
throttle
debounce vs throttle
generator send
Scope
· 2
lexical scope
block scope
Closures
· 7
closure basics
closure counter
var loop binding
closure factory
memoization
partial application
private closure
Objects
· 13
object literals
computed keys
getters/setters
object iteration
object transform
Object.freeze
object spread
shallow copy
this keyword
this binding
ES6 shorthand
Object.create
defineProperty
Arrays
· 17
array basics
push/pop/shift
array map
array filter
array reduce
reduce to object
find/findIndex
some/every
array flat
slice/splice
array sort
Array.from
Array.from data
method chaining
sort mutation
reduceRight
destructure loop
Destructuring
· 6
array destructure
object destructure
nested destructure
param destructure
swap variables
iterable destructure
Spread
· 3
spread operator
spread args
string spread
Strings
· 4
string methods
trim/split/replace
template literals
tagged templates
Numbers
· 2
number formatting
number checks
Math
· 2
Math methods
random integers
Classes
· 8
class syntax
class extends
static members
private fields
fluent chaining
abstract methods
mixins
class iterable
Prototypes
· 2
prototype chain
call/apply/bind
Error Handling
· 6
try/catch
custom errors
error types
unhandled rejection
error cause
Result type
Promises
· 5
promise basics
promise chaining
Promise.all
Promise.allSettled
race/any
Async/Await
· 9
async/await
await errors
parallel await
async generators
lazy pagination
retry backoff
promise timeout
async methods
for await...of
Generators
· 4
generators
generator iterable
infinite generator
lazy pipeline
Iterators
· 2
custom iterable
tree traversal
Map
· 3
Map basics
Map vs Object
frequency Map
Set
· 2
Set basics
Set operations
Proxy
· 4
proxy get
proxy set
proxy logging
proxy schema
WeakMap
· 1
WeakMap
Symbols
· 4
Symbol unique
Symbol keys
well-known Symbols
Symbol.for
Reflect
· 1
Reflect API
Regex
· 5
regex basics
capture groups
named groups
regex flags
stateful regex
Date
· 3
date basics
date difference
date format
JSON
· 3
JSON basics
JSON replacer
JSON limits
Modules
· 1
IIFE module
Design Patterns
· 7
observer pattern
factory pattern
singleton
strategy pattern
builder pattern
state machine
command pattern
Data Structures
· 4
stack LIFO
queue FIFO
linked list
binary search tree
Algorithms
· 8
binary search
merge sort
two pointers
sliding window
dynamic programming
flatten array
BFS traversal
DFS traversal
Functional Patterns
· 6
immutable update
compose reduce
lenses
tap function
Maybe monad
pipe order
Performance
· 3
lazy properties
object pool
closure leaks
BigInt
· 1
BigInt
Intl
· 2
number locale
relative time
Web APIs
· 3
URL API
AbortController
TextEncoder
Modern JS
· 2
??= caveat
Object.hasOwn