Index
A
- apply trap / The apply(target, thisValue, arguments) method
- arithmetic-related operations / Arithmetic-related operations
- Array.from(iterable, mapFunc, this) method / The Array.from(iterable, mapFunc, this) method
- Array.of(values…) method / The Array.of(values…) method
- array buffer / ArrayBuffer
- array destructuring assignment
- about / The array destructuring assignment
- values, ignoring / Ignoring values
- rest operator, using / Using the rest operator in an array destructuring assignment
- default values, for variables / Default values for variables
- nested array destructuring / Nested array destructuring
- using, as parameter / Using a destructuring assignment as a parameter
- array iteration
- about / Array iteration
- map() method / The map() method
- filter() method / The filter() method
- forEach() method / forEach() method
- some() method / some() method
- arrays
- about / The spread operator, Arrays
- Array.from(iterable, mapFunc, this) method / The Array.from(iterable, mapFunc, this) method
- Array.of(values…) method / The Array.of(values…) method
- fill(value, startIndex, endIndex) method / The fill(value, startIndex, endIndex) method
- includes() method / The includes() method
- includes(), versus indexOf() method / The includes() versus the indexOf() method
- find(testingFunc) method / The find(testingFunc) method
- findIndex(testingFunc) method / The findIndex(testingFunc) method
- copyWithin(targetIndex, startIndex, endIndex) function / The copyWithin(targetIndex, startIndex, endIndex) function
- entries() method / The entries(), keys(), and values() methods
- values() method / The entries(), keys(), and values() methods
- key() method / The entries(), keys(), and values() methods
- arrow functions
- about / Arrow functions
- this keyword / The value of "this" in an arrow function
- versus traditional functions / Other differences between arrow and traditional functions
- async/await
- about / async/await – the future of asynchronous programming
- versus promise / async/await versus promises
- async function / The async function and await keyword
- asynchronous code
- writing / Writing asynchronous code
- with events / Asynchronous code involving events
- with callbacks / Asynchronous code involving callbacks
- making synchronous / Making asynchronous code look synchronous
- Asynchronous Module Definition (AMD)
- about / Implementing modules – the old way, Asynchronous Module Definition (AMD)
- used, for implementing modules / Asynchronous Module Definition (AMD)
- asynchronous programming
- promise / Promises and async programming
- atomics
- about / What are atomics?
- in JavaScript / Atomics in JavaScript
- using / Fixing one billion count with atomics
- optimized fix / The optimized fix
- Atomics.add(typedArray, index, value) method / Using the Atomics.add(typedArray, index, value) method
- Atomics.and(typedArray, index, value) method / Using the Atomics.and(typedArray, index, value) method
- Atomics.load(typedArray, index) method / Using the Atomics.load(typedArray, index) method
- Atomics.or(typedArray, index, value) method / Using the Atomics.or(typedArray, index, value) method
- Atomics.sub(typedArray, index, value) method / Using the Atomics.sub(typedArray, index, value) method
- Atomics.xor(typedArray, index, value) method / Using the Atomics.xor(typedArray, index, value) method
- automatic semicolon insertion
- in JavaScript / Automatic semicolon insertion in JavaScript
- await keyword / The async function and await keyword
B
- Binary Large Object (BLOB) / The Fetch API - promise-based HTTP requests
- binary notation / The binary notation
- bitwise AND
- working / How bitwise AND works
- bitwise OR
- working / How bitwise OR works
- bitwise XOR
- working / How bitwise XOR works
- block-scoped variables
- declaring, let keyword used / Declaring block-scoped variables
C
- callback
- versus promise / Promises versus callbacks
- callback-hell / Promises versus callbacks
- call stack / The call stack
- Canvas API / The Canvas API - the web's drawing board
- classes
- using / Using classes
- defining / Defining a class
- declaring / The class declaration
- prototype methods / The prototype methods
- get method / Getters and setters
- set method / Getters and setters
- generator method / The generator method
- static methods / Static methods
- inheritance, implementing in / Implementing inheritance in classes
- computed method names / Computed method names
- properties, attributes / The attributes of properties
- ReferenceError exception / Classes are not hoisted!
- result of constructor method, overriding / Overriding the result of the constructor method
- Symbol.species static accessor property / The Symbol.species static accessor property
- new.target implicit parameter / The new.target implicit parameter
- class expression / The class expression
- Clipboard API / Clipboard API - programmatically manipulating the clipboard
- closure / Closures and let keyword
- collections
- about / Collections
- arrays / ArrayBuffer
- typed arrays / Typed arrays
- sets / Set
- WeakSet / WeakSet
- Map / Map
- WeakMap / WeakMap
- CommonJS
- about / CommonJS
- used, for implementing modules / CommonJS
- computed property names / Computed property names
- concurrent programming
- versus concurrent programming / Parallel versus concurrent programming
- constant variables
- used, for referencing objects / Referencing objects using constant variables
- const keyword
- about / The const keyword
- using / When to use var/let/const
- versus Object.freeze / Object.freeze versus const
- const variables
- scope / The scope of const variables
- cookies
- about / HyperText Transfer Protocol (HTTP)
- data, storing with / Storing data with cookies
- setting / Setting cookies
- deleting / Deleting cookies
- versus local storage / Cookies versus local storage
- cookie value
- obtaining / Getting a cookie value
- copyWithin(targetIndex, startIndex, endIndex) function / The copyWithin(targetIndex, startIndex, endIndex) function
- Cross-Origin Resource Sharing (CORS) / Fetch API customization
D
- data
- storing, with cookies / Storing data with cookies
- deadlock / What, exactly, is a deadlock?
- dedicated web workers
- working with / Working with dedicated web workers, Working with dedicated workers
- setting up / Setting up a dedicated worker
- messages, listening on main script / Listening for messages on the main script
- messages, listening on worker script / Listening for messages on the worker script
- messages, sending from main script / Sending messages from the main script
- messages, sending from worker script / Sending messages from the worker script
- error handling / Error handling in workers
- terminating / Terminating workers
- terminating, from worker script / Terminating from the worker script
- terminating, from main script / Terminating from the main script
- data transfer, through postMessage / Transferring (not copying) data through postMessage
- default parameter values / Default parameter values
- defineProperty trap
- about / The defineProperty(target, property, descriptor) method
- rule / Rule for using defineProperty
- deleteProperty trap
- about / The deleteProperty(target, property) method
- rule / Rule for deleteProperty trap
- destructuring assignment
- about / Destructuring assignments
- array destructuring assignment / The array destructuring assignment
- object destructuring assignment / Object destructuring assignments
- document.cookie / The document.cookie is a strange object
- Document Object Model (DOM) / The Array.from(iterable, mapFunc, this) method, What is the Document Object Model (DOM)?
- DOM methods
- about / DOM methods/properties
- getElementById method / Using the getElementById method
- getElementsByTagName method / Using the getElementsByTagName method
- getElementsByClassName method / Using the getElementsByClassName method
- querySelector method / Using the querySelector method
- querySelectorAll method / Using the querySelectorAll method
E
- endsWith(string, index) function / The endsWith(string, index) function
- enhanced object literals
- about / Enhanced object literals
- properties, defining / Defining properties
- methods, defining / Defining methods
- computed property names / Computed property names
- escape sequence problem
- with template literals / Escape sequence problem with template literals
- event loop
- about / The event loop
- call stack / The call stack
- stack / Stack, queue, and Web APIs
- queue / Stack, queue, and Web APIs
- web APIs / Stack, queue, and Web APIs
- exponential operator / Exponential operator
- exports
- versus module.exports / exports versus module.exports
- export statement
- in modules / Additional information on export
- expressions / Expressions
F
- Fetch API
- about / The Fetch API - promise-based HTTP requests
- customizing / Fetch API customization
- fill(value, startIndex, endIndex) method / The fill(value, startIndex, endIndex) method
- filter() method / The filter() method
- find(testingFunc) method / The find(testingFunc) method
- findIndex(testingFunc) method / The findIndex(testingFunc) method
- forEach() method / forEach() method
- Frames Per Second (FPS) / Garbage collection
- function-scoped variables
- declaring, var keyword used / Declaring function-scoped variables
G
- garbage collection / Garbage collection
- generator function
- about / Generator function
- example / Generator function
- return(value) method / The return(value) method
- throw(exception) method / The throw(exception) method
- yield keyword / The yield* keyword
- for...of loop / The for…of loop
- getOwnPropertyDescriptor trap
- about / The getOwnPropertyDescriptor(target, property) method
- rules / Rules for using getOwnPropertyDescriptor trap
- getPrototypeOf trap
- about / The getPrototypeOf(target) method
- rules / Rules for using getPrototypeOf trap
- get trap
- about / The get(target, property, receiver) method
- rules / Rules for using get trap
H
- has trap
- about / The has(target, property) method
- rules / Rules for using has trap
- history API
- used, for accessing history / Accessing and modifying history with the history API
- used, for modifying history API / Accessing and modifying history with the history API
- window.onpopstate events / Handling window.onpopstate events
- methods / Modifying history - the history.go(distance) method, Jumping ahead - the history.forward() method, Pushing on the history stack - history.replaceState()
- hoisting / Hoisting
- HTML5 / HTML5 and the rise of modern JavaScript
- HTML DOM / The HTML DOM
- HTML tags / The HTML DOM
- HTTP state
- mimicking / Mimicking an HTTP state
- HyperText Transfer Protocol (HTTP) / HyperText Transfer Protocol (HTTP)
I
- Immediately-Invoked Function Expression (IIFE)
- about / Implementing modules – the old way
- used, for implementing modules / Immediately-Invoked Function Expression (IIFE)
- immutability
- in JavaScript / Immutability in JavaScript
- import statement / Additional information on import
- includes() method / The includes() method
- includes(string, index) method / The includes(string, index) method
- indexedDB / The indexedDB - storing large data
- indexedDB database
- opening / Opening an indexedDB database
- upgradeneeded event, handling / Handling the upgradeneeded event
- data, adding to object stores / Adding data to object stores
- data, reading from object stores / Reading data from object stores
- data, deleting from object stores / Deleting data from object stores
- indexOf(string) function / The indexOf(string) function
- inline web workers / Introduction to inline web workers
- Internet Service Provider (ISP) / What is a TLS/SSL handshake?
- isExtensible trap
- about / The isExtensible(target) method
- rules / Rule for using isExtensible trap
- isNaN
- versus Number.isNaN / isNaN versus Number.isNaN
- iterable / The spread operator
- iterable protocol / The iterable protocol
- iteration protocol / The iteration protocol
- iterator protocol / The iterator protocol
J
- JavaScript
- immutability / Immutability in JavaScript
- trailing commas / Trailing commas and JavaScript
- automatic semicolon insertion / Automatic semicolon insertion in JavaScript
- semicolons, inserting / Where to insert semicolons in JavaScript?
- data types / The JavaScript data types
- JavaScript browser APIs
- about / Modern JavaScript browser APIs
- Page Visibility API / Page Visibility API - is the user still on the page?
- navigator.onLine API / navigator.onLine API – the user's network status
- Clipboard API / Clipboard API - programmatically manipulating the clipboard
- Canvas API / The Canvas API - the web's drawing board
- Fetch API / The Fetch API - promise-based HTTP requests
- history API / Accessing and modifying history with the history API
- JavaScript execution model / JavaScript execution model
L
- lastIndexOf(string) / The lastIndexOf(string)
- let keyword
- about / The let keyword, Closures and let keyword
- block-scoped variables, declaring / Declaring block-scoped variables
- using / When to use var/let/const
- versus var keyword / Let versus var versus const performance benchmarks
- local storage
- versus cookies / Cookies versus local storage
- localStorage
- working with / Working with localStorage
- local storage entry, creating / Creating a local storage entry
- stored item, obtaining / Getting a stored item
- stored items, removing / Removing a stored item
- items, clearing / Clearing all the items
- methods / localStorage.getItem('key') versus localStorage.key versus localStorage['key']
- lock operation / Information about lock and mutex
M
- map / Map
- map() method / The map() method
- Math.clz32(number) function / The Math.clz32(number) function
- Math.fround(number) function / The Math.fround(number) function
- Math.imul(number1, number2) function / The Math.imul(number1, number2) function
- Math.sign(number) function / The Math.sign(number) function
- Math.trunc(number) function / The Math.trunc(number) function
- mathematical operations
- about / Doing math
- trigonometry-related operations / Trigonometry-related operations
- arithmetic-related operations / Arithmetic-related operations
- exponential operator / Exponential operator
- miscellaneous math methods / Miscellaneous math methods
- memory
- basics / Basics of memory
- managing, manually / Manually managing memory
- memory management / Abstraction of memory management
- methods, history API
- history.go(distance) method / Modifying history - the history.go(distance) method
- history.forward() method / Jumping ahead - the history.forward() method
- history.back() method / Going back - the history.back() method
- history.pushState() / Pushing on the history - history.pushState()
- history.replaceState() / Pushing on the history stack - history.replaceState()
- methods, Reflect object
- Reflect.apply(function, this, args) method / The Reflect.apply(function, this, args) method
- Reflect.construct(constructor, args, prototype) method / The Reflect.construct(constructor, args, prototype) method
- Reflect.defineProperty(object, property, descriptor) method / The Reflect.defineProperty(object, property, descriptor) method
- Reflect.deleteProperty(object, property) method / The Reflect.deleteProperty(object, property) method
- Reflect.get(object, property, this) method / The Reflect.get(object, property, this) method
- Reflect.set(object, property, value, this) method / The Reflect.set(object, property, value, this) method
- Reflect.getOwnPropertyDescriptor(object, property) method / The Reflect.getOwnPropertyDescriptor(object, property) method
- Reflect.getPrototypeOf(object) method / The Reflect.getPrototypeOf(object) method
- Reflect.setPrototypeOf(object, prototype) method / The Reflect.setPrototypeOf(object, prototype) method
- Reflect.has(object, property) method / The Reflect.has(object, property) method
- Reflect.isExtensible(object) method / The Reflect.isExtensible(object) method
- Reflect.preventExtensions(object) method / The Reflect.preventExtensions(object) method
- Reflect.ownKeys(object) method / The Reflect.ownKeys(object) method
- methods, strings
- repeat(count) method / The repeat(count) method
- includes(string, index) method / The includes(string, index) method
- startsWith(string, index) method / The startsWith(string, index) method
- endsWith(string, index) function / The endsWith(string, index) function
- indexOf(string) function / The indexOf(string) function
- lastIndexOf(string) / The lastIndexOf(string)
- padStart(length [, padString]) / The padStart(length [, padString])
- padEnd(length [, padString]) / The padEnd(length [, padString])
- miscellaneous math methods
- Math.imul(number1, number2) function / The Math.imul(number1, number2) function
- Math.clz32(number) function / The Math.clz32(number) function
- Math.sign(number) function / The Math.sign(number) function
- Math.trunc(number) function / The Math.trunc(number) function
- Math.fround(number) function / The Math.fround(number) function
- modular programming
- about / JavaScript modules 101
- benefits / JavaScript modules 101
- module.exports
- versus exports / exports versus module.exports
- modules
- about / JavaScript modules 101
- implementing / Implementing modules – the old way, Implementing modules – the new way
- implementing, Immediately-Invoked Function Expression (IIFE) used / Immediately-Invoked Function Expression (IIFE)
- implementing, Asynchronous Module Definition (AMD) used / Asynchronous Module Definition (AMD)
- implementing, CommonJS used / CommonJS
- implementing, Universal Module Definition (UMD) used / Universal Module Definition (UMD)
- importing / Importing/exporting modules
- exporting / Importing/exporting modules
- named, versus default exports / Named versus default exports
- named imports, naming / Naming named imports
- wildcard imports / Wildcard imports
- using, on web / Using modules on the web
- multiline strings / Multiline strings
- multiple arrays
- spreading / Spreading multiple arrays
- mutex / Information about lock and mutex
N
- navigator.onLine API / navigator.onLine API – the user's network status
- new operator / The new operator
- non-tail calls
- converting, into tail calls / Converting non-tail calls into tail calls
- Number.EPSILON property / The Number.EPSILON property
- Number.isFinite(number) method / The Number.isFinite(number) method
- Number.isInteger(number) method / The Number.isInteger(number) method
- Number.isNaN
- versus isNaN / isNaN versus Number.isNaN
- Number.isNaN(value) method / The Number.isNaN(value) method
- Number.isSafeInteger(number) method / The Number.isSafeInteger(number) method
- numbers
- working with / Working with numbers
- binary notation / The binary notation
- octal notation / The octal notation
O
- object-oriented JavaScript
- about / Understanding object-oriented JavaScript
- JavaScript data types / The JavaScript data types
- objects, creating / Creating objects
- prototypal inheritance model / Understanding the prototypal inheritance model
- constructors, of primitive data types / The constructors of primitive data types
- Object.assign(targetObj, sourceObjs…) method / The Object.assign(targetObj, sourceObjs…) method
- Object.entries() method / Object.entries()
- Object.freeze
- versus const / Object.freeze versus const
- Object.getOwnPropertyDescriptors() method / Object.getOwnPropertyDescriptors()
- Object.getOwnPropertySymbols() method / The Object.getOwnPropertySymbols() method
- Object.is(value1, value2) method / The Object.is(value1, value2) method
- Object.setPrototypeOf(object, prototype) method / The Object.setPrototypeOf(object, prototype) method
- Object.values() method / Object.values()
- object destructuring assignment
- about / Object destructuring assignments
- default values, for variables / Default values for variables
- nested objects, destructuring / Destructuring nested objects
- using, as parameter / Using the object destructuring assignment as a parameter
- object literals
- super, using in / Using super in object literals
- objects
- referencing, constant variables used / Referencing objects using constant variables
- about / Objects
- octal notation / The octal notation
- ownKeys trap
- about / The ownKeys(target) method
- rules / Rules for using ownKeys trap
P
- padEnd(length [, padString]) method / The padEnd(length [, padString])
- padStart(length [, padString]) method / The padStart(length [, padString])
- Page Visibility API / Page Visibility API - is the user still on the page?
- parallel computing
- verifying / Myth-busting--Parallel computation is always faster, Let's count one billion!
- parallel programming
- about / Understanding parallel programming
- versus concurrent programming / Parallel versus concurrent programming
- parameter
- array destructuring assignment, using as / Using a destructuring assignment as a parameter
- object destructuring assignment, using as / Using the object destructuring assignment as a parameter
- preventExtensions trap
- about / The preventExtensions(target) method
- rule / Rule for using preventExtensions trap
- promise
- about / Promises and async programming
- fulfilled state / Promise states
- rejected state / Promise states
- pending state / Promise states
- settled state / Promise states
- versus callback / Promises versus callbacks
- then(onFulfilled, onRejected) method / The then(onFulfilled, onRejected) method
- catch(onRejected) method / The catch(onRejected) method
- Promise.resolve(value) method / The Promise.resolve(value) method
- Promise.reject(value) method / The Promise.reject(value) method
- Promise.all(iterable) method / The Promise.all(iterable) method
- Promise.race(iterable) method / The Promise.race(iterable) method
- versus async/await / async/await versus promises
- Promise constructor / Promise constructor and (resolve, reject) methods
- property keys
- symbols, using as / Using symbols as the object property keys
- prototypal inheritance model / The __proto__ property
- proxies
- about / Proxies in a nutshell
- target / Terminology for proxies
- traps / Terminology for proxies
- handler / Terminology for proxies
- revocable proxy / The Proxy.revocable(target, handler) method
- uses / The uses of proxies
- Proxy API
- working with / Working with the Proxy API
- proxy traps
- about / Proxy traps
- get trap / The get(target, property, receiver) method
- set trap / The set(target, property, value, receiver) method
- has trap / The has(target, property) method
- isExtensible trap / The isExtensible(target) method
- getPrototypeOf trap / The getPrototypeOf(target) method
- setPrototypeOf trap / The setPrototypeOf(target, prototype) method
- preventExtensions trap / The preventExtensions(target) method
- getOwnPropertyDescriptor trap / The getOwnPropertyDescriptor(target, property) method
- defineProperty trap / The defineProperty(target, property, descriptor) method
- deleteProperty trap / The deleteProperty(target, property) method
- ownKeys trap / The ownKeys(target) method
- apply trap / The apply(target, thisValue, arguments) method
Q
- queue / Stack, queue, and Web APIs
R
- race condition / What, exactly, is a race condition?, The race condition
- raw string / Raw strings
- Reflect object
- about / The Reflect object
- methods / The Reflect.apply(function, this, args) method, The Reflect.construct(constructor, args, prototype) method, The Reflect.deleteProperty(object, property) method, The Reflect.set(object, property, value, this) method, The Reflect.getPrototypeOf(object) method, The Reflect.isExtensible(object) method
- data properties / Understanding the data properties and accessor properties
- accessor properties / Understanding the data properties and accessor properties
- repeat(count) method / The repeat(count) method
- rest opeartor
- using, in array destructuring assignment / Using the rest operator in an array destructuring assignment
- rest parameter / The rest parameter
- revocable proxy
- about / The Proxy.revocable(target, handler) method
- use case / Use case of revocable proxy
S
- same origin policy / Same origin policy
- semaphores / What, exactly, is a race condition?
- semicolons
- about / The semicolon dilemma
- inserting, in JavaScript / Where to insert semicolons in JavaScript?
- service workers
- working with / Working with service workers
- prerequisites / Prerequisites for service workers
- browser support / Checking for browser support
- life cycle / The service worker life cycle
- registering / Registering a service worker
- installing / Installing service workers
- fetching with / Fetching with service workers
- SessionStorage
- working with / Working with SessionStorage
- session storage entry, creating / Creating a session storage entry
- stored item, obtaining / Getting a stored item
- stored item, removing / Removing a stored item
- items, clearing / Clearing all items
- set / Set
- setPrototypeOf trap
- about / The setPrototypeOf(target, prototype) method
- rule / Rule for using setPrototypeOf trap
- set trap
- about / The set(target, property, value, receiver) method
- rules / Rules for using set trap
- SharedArrayBuffer / Introduction to SharedArrayBuffer
- shared memory / What is shared memory?
- shared worker connection
- terminating / Terminating a shared worker connection
- shared workers
- working with / Working with shared workers, Working with shared workers
- setting up / Setting up a shared worker
- messages, listening on main script / Listening for messages on the main script
- messages, listening on worker script / Listening for messages on the worker script
- messages, sending from parent scripts / Sending messages from parent scripts
- messages, sending from worker script / Sending messages from the worker script
- error handling / Error handling
- terminating, completely / Terminating a shared worker completely
- single parent-worker connection
- terminating / Terminating a single parent-worker connection
- some() method / some() method
- Spectre
- about / A peek into Spectre
- reference / A peek into Spectre
- spread operator
- about / The spread operator
- benefits / Other uses of the spread operator, Making array values a part of another array, Pushing the values of an array into another array
- stack / Stack, queue, and Web APIs
- startsWith(string, index) method / The startsWith(string, index) method
- storage changes
- handling, across multiple tabs / Handling storage changes across multiple tabs
- strings
- working with / Working with strings
- methods / The repeat(count) method
- template strings / Template strings
- expressions / Expressions
- super
- using, in object literals / Using super in object literals
- Symbol.for(string) method / The Symbol.for(string) method
- symbols
- about / Symbols – primitive data type
- using, as property keys / Using symbols as the object property keys
- built-in symbols / Well-known symbols
T
- tag function / Expressions
- tagged template literals / Tagged template literals
- tagged template string / Expressions
- tail-recursion / Why tail call optimization?
- tail call optimization
- about / Tail call optimization
- need for / Why tail call optimization?
- tail calls
- non-tail calls, converting into / Converting non-tail calls into tail calls
- template strings / Template strings
- this keyword
- in arrow function / The value of "this" in an arrow function
- threads / An introduction to the concept of threads, What makes something thread-safe?
- TLS/SSL handshake / What is a TLS/SSL handshake?
- trailing commas
- in JavaScript / Trailing commas and JavaScript
- Transport Layer Security (TLS)/Secure Sockets Layer (SSL) / What is a TLS/SSL handshake?
- tree shaking / Tree shaking, How tree shaking is performed
- trigonometry-related operations / Trigonometry-related operations
- typed array / Typed arrays
- typeof operator / The typeof operator
U
- Universal Module Definition (UMD)
- about / Implementing modules – the old way, Universal Module Definition (UMD)
- used, for implementing modules / Universal Module Definition (UMD)
V
- variables
- re-declaring / Re-declaring variables
- var keyword
- function-scoped variables, declaring / Declaring function-scoped variables
- about / Re-declaring variables
- using / When to use var/let/const
- versus const keyword / Let versus var versus const performance benchmarks
W
- WeakMap / WeakMap
- WeakSet / WeakSet
- web
- modules, using on / Using modules on the web
- web APIs / Stack, queue, and Web APIs
- WebAssembly / Manually managing memory
- web workers
- support, checking / Checking if worker support is available
- dedicated web workers / Working with dedicated web workers