Eloquent Javascript
Edition: 4th Edition
Publisher: No Starch Press
Published: 2024-11-05
Language: eng
Format: Paperback
Number of pages: 456
ISBN-13: 9781718504103
Notes: Updated to ECMAScript 2024
Table of contents: label: Introduction
title: 1; label: On Programming
title: 2; label: Why Language Matters
title: 3; label: What Is JavaScript?
title: 5; label: Code, and What to Do with It
title: 6; label: Overview of This Book
title: 7; label: Typographic Conventions
title: 8; title: Part I: Language; label: 1: Values, Types, and Operators
title: 11; label: Values
title: 12; label: Numbers
title: 12; label: Arithmetic
title: 13; label: Special Numbers
title: 14; label: Strings
title: 14; label: Unary Operators
title: 15; label: Boolean Values
title: 16; label: Comparison
title: 16; label: Logical Operators
title: 17; label: Empty Values
title: 18; label: Automatic Type Conversion
title: 18; label: Short-Circuiting of Logical Operators
title: 19; label: Summary
title: 20; label: 2: Program Structure
title: 23; label: Expressions and Statements
title: 23; label: Bindings
title: 24; label: Binding Names
title: 26; label: The Environment
title: 26; label: Functions
title: 26; label: The console.log Function
title: 27; label: Return Values
title: 27; label: Control Flow
title: 28; label: Conditional Execution
title: 28; label: while and do Loops
title: 30; label: Indenting Code
title: 31; label: for Loops
title: 32; label: Breaking Out of a Loop
title: 33; label: Updating Bindings Succinctly
title: 33; label: Dispatching on a Value with switch
title: 34; label: Capitalization
title: 35; label: Comments
title: 35; label: Summary
title: 36; label: Exercises
title: 36; label: Looping a Triangle
title: 36; label: FizzBuzz
title: 37; label: Chessboard
title: 37; label: 3: Functions
title: 39; label: Defining a Function
title: 39; label: Bindings and Scopes
title: 40; label: Nested Scope
title: 41; label: Functions as Values
title: 42; label: Declaration Notation
title: 42; label: Arrow Functions
title: 43; label: The Call Stack
title: 44; label: Optional Arguments
title: 45; label: Closure
title: 46; label: Recursion
title: 47; label: Growing Functions
title: 50; label: Functions and Side Effects
title: 52; label: Summary
title: 52; label: Exercises
title: 53; label: Minimum
title: 53; label: Recursion
title: 53; label: Bean Counting
title: 53; label: 4: Data Structures: Objects and Arrays
title: 57; label: The Weresquirrel
title: 58; label: Datasets
title: 58; label: Properties
title: 59; label: Methods
title: 60; label: Objects
title: 60; label: Mutability
title: 63; label: The Lycanthrope’s Log
title: 64; label: Computing Correlation
title: 65; label: Array Loops
title: 67; label: The Final Analysis
title: 67; label: Further Arrayology
title: 69; label: Strings and Their Properties
title: 70; label: Rest Parameters
title: 72; label: The Math Object
title: 73; label: Destructuring
title: 74; label: Optional Property Access
title: 75; label: JSON
title: 75; label: Summary
title: 76; label: Exercises
title: 77; label: The Sum of a Range
title: 77; label: Reversing an Array
title: 77; label: A List
title: 77; label: Deep Comparison
title: 78; label: 5: Higher-Order Functions
title: 81; label: Abstraction
title: 82; label: Abstracting Repetition
title: 82; label: Higher-Order Functions
title: 84; label: Script Dataset
title: 85; label: Filtering Arrays
title: 86; label: Transforming with map
title: 86; label: Summarizing with reduce
title: 87; label: Composability
title: 88; label: Strings and Character Codes
title: 89; label: Recognizing Text
title: 91; label: Summary
title: 92; label: Exercises
title: 92; label: Flattening
title: 92; label: Your Own Loop
title: 93; label: Everything
title: 93; label: Dominant Writing Direction
title: 93; label: 6: The Secret Life of Objects
title: 95; label: Abstract Data Types
title: 95; label: Methods
title: 96; label: Prototypes
title: 97; label: Classes
title: 98; label: Private Properties
title: 100; label: Overriding Derived Properties
title: 101; label: Maps
title: 102; label: Polymorphism
title: 104; label: Getters, Setters, and Statics
title: 105; label: Symbols
title: 106; label: The Iterator Interface
title: 107; label: Inheritance
title: 109; label: The instanceof Operator
title: 110; label: Summary
title: 111; label: Exercises
title: 111; label: A Vector Type
title: 111; label: Groups
title: 112; label: Iterable Groups
title: 112; label: 7: Project: A Robot
title: 115; label: Meadowfield
title: 115; label: The Task
title: 117; label: Persistent Data
title: 118; label: Simulation
title: 119; label: The Mail Truck’s Route
title: 121; label: Pathfinding
title: 121; label: Exercises
title: 123; label: Measuring a Robot
title: 123; label: Robot Efficiency
title: 124; label: Persistent Group
title: 124; label: 8: Bugs and Errors
title: 127; label: Language
title: 127; label: Strict Mode
title: 128; label: Types
title: 129; label: Testing
title: 130; label: Debugging
title: 131; label: Error Propagation
title: 132; label: Exceptions
title: 133; label: Cleaning Up After Exceptions
title: 134; label: Selective Catching
title: 136; label: Assertions
title: 138; label: Summary
title: 138; label: Exercises
title: 139; label: Retry
title: 139; label: The Locked Box
title: 139; label: 9: Regular Expressions
title: 141; label: Creating a Regular Expression
title: 141; label: Testing for Matches
title: 142; label: Sets of Characters
title: 142; label: International Characters
title: 144; label: Repeating Parts of a Pattern
title: 145; label: Grouping Subexpressions
title: 146; label: Matches and Groups
title: 146; label: The Date Class
title: 147; label: Boundaries and Look-Ahead
title: 148; label: Choice Patterns
title: 149; label: The Mechanics of Matching
title: 149; label: Backtracking
title: 150; label: The replace Method
title: 151; label: Greed
title: 153; label: Dynamically Creating RegExp Objects
title: 154; label: The search Method
title: 154; label: The lastIndex Property
title: 155; label: Parsing an INI File
title: 156; label: Code Units and Characters
title: 158; label: Summary
title: 159; label: Exercises
title: 160; label: Regexp Golf
title: 160; label: Quoting Style
title: 161; label: Numbers Again
title: 161; label: 10: Modules
title: 163; label: Modular Programs
title: 164; label: ES Modules
title: 164; label: Packages
title: 166; label: CommonJS Modules
title: 167; label: Building and Bundling
title: 170; label: Module Design
title: 170; label: Summary
title: 172; label: Exercises
title: 173; label: A Modular Robot
title: 173; label: Roads Module
title: 173; label: Circular Dependencies
title: 173; label: 11: Asynchronous Programming
title: 175; label: Asynchronicity
title: 176; label: Callbacks
title: 177; label: Promises
title: 178; label: Failure
title: 180; label: Carla
title: 181; label: Breaking In
title: 182; label: async Functions
title: 184; label: Generators
title: 185; label: A Corvid Art Project
title: 186; label: The Event Loop
title: 189; label: Asynchronous Bugs
title: 190; label: Summary
title: 191; label: Exercises
title: 191; label: Quiet Times
title: 191; label: Real Promises
title: 192; label: Building Promise.all
title: 192; label: 12: Project: A Programming Language
title: 195; label: Parsing
title: 195; label: The Evaluator
title: 199; label: Special Forms
title: 200; label: The Environment
title: 202; label: Functions
title: 203; label: Compilation
title: 204; label: Cheating
title: 205; label: Exercises
title: 205; label: Arrays
title: 205; label: Closure
title: 206; label: Comments
title: 206; label: Fixing Scope
title: 206; title: Part II: Browser; label: 13: Javascript and the Browser
title: 209; label: Networks and the Internet
title: 209; label: The Web
title: 211; label: HTML
title: 211; title: xvi Contents in Detail; label: HTML and JavaScript
title: 213; label: In the Sandbox
title: 214; label: Compatibility and the Browser Wars
title: 215; label: 14: The Document Object Model
title: 217; label: Document Structure
title: 217; label: Trees
title: 218; label: The Standard
title: 219; label: Moving Through the Tree
title: 220; label: Finding Elements
title: 221; label: Changing the Document
title: 222; label: Creating Nodes
title: 223; label: Attributes
title: 224; label: Layout
title: 225; label: Styling
title: 227; label: Cascading Styles
title: 228; label: Query Selectors
title: 229; label: Positioning and Animating
title: 230; label: Summary
title: 232; label: Exercises
title: 232; label: Build a Table
title: 232; label: Elements by Tag Name
title: 233; label: The Cat’s Hat
title: 233; label: 15: Handling Events
title: 235; label: Event Handlers
title: 235; label: Events and DOM Nodes
title: 236; label: Event Objects
title: 237; label: Propagation
title: 237; label: Default Actions
title: 239; label: Key Events
title: 239; label: Pointer Events
title: 240; label: Mouse Clicks
title: 241; label: Mouse Motion
title: 242; label: Touch Events
title: 243; label: Scroll Events
title: 244; label: Focus Events
title: 245; label: Load Event
title: 246; label: Events and the Event Loop
title: 246; label: Timers
title: 247; label: Debouncing
title: 248; label: Summary
title: 249; label: Exercises
title: 249; label: Balloon
title: 249; label: Mouse Trail
title: 249; label: Tabs
title: 250; label: 16: Project: A Platform Game
title: 253; label: The Game
title: 253; label: The Technology
title: 254; label: Levels
title: 255; label: Reading a Level
title: 255; label: Actors
title: 257; label: Drawing
title: 260; label: Motion and Collision
title: 265; label: Actor Updates
title: 267; label: Tracking Keys
title: 269; label: Running the Game
title: 270; label: Exercises
title: 272; label: Game Over
title: 272; label: Pausing the Game
title: 272; label: A Monster
title: 272; label: 17: Drawing On Canvas
title: 275; label: SVG
title: 276; label: The canvas Element
title: 276; label: Lines and Surfaces
title: 277; label: Paths
title: 278; label: Curves
title: 279; label: Drawing a Pie Chart
title: 282; label: Text
title: 283; label: Images
title: 283; label: Transformation
title: 285; label: Storing and Clearing Transformations
title: 287; label: Back to the Game
title: 288; label: Choosing a Graphics Interface
title: 293; label: Summary
title: 294; label: Exercises
title: 294; label: Shapes
title: 294; label: The Pie Chart
title: 295; label: A Bouncing Ball
title: 295; label: Precomputed Mirroring
title: 295; label: 18: HTTP and Forms
title: 297; label: The Protocol
title: 297; label: Browsers and HTTP
title: 299; label: Fetch
title: 300; label: HTTP Sandboxing
title: 302; label: Appreciating HTTP
title: 302; label: Security and HTTPS
title: 303; label: Form Fields
title: 303; label: Focus
title: 305; label: Disabled Fields
title: 306; label: The Form as a Whole
title: 306; label: Text Fields
title: 307; label: Checkboxes and Radio Buttons
title: 309; label: Select Fields
title: 310; label: File Fields
title: 311; label: Storing Data Client-Side
title: 312; label: Summary
title: 314; label: Exercises
title: 315; label: Content Negotiation
title: 315; label: A JavaScript Workbench
title: 315; label: Conway’s Game of Life
title: 315; label: 19: Project: A Pixel Art Editor
title: 319; label: Components
title: 320; label: The State
title: 321; label: DOM Building
title: 322; label: The Canvas
title: 323; label: The Application
title: 325; label: Drawing Tools
title: 327; label: Saving and Loading
title: 330; label: Undo History
title: 332; label: Let’s Draw
title: 333; label: Why Is This So Hard?
title: 334; label: Exercises
title: 335; label: Keyboard Bindings
title: 335; label: Efficient Drawing
title: 335; label: Circles
title: 336; label: Proper Lines
title: 336; title: Part III: Node; label: 20: Node.js
title: 339; label: Background
title: 339; label: The node Command
title: 340; label: Modules
title: 341; label: Installing with NPM
title: 342; label: Package Files
title: 342; label: Versions
title: 343; label: The Filesystem Module
title: 344; label: The HTTP Module
title: 345; label: Streams
title: 346; label: A File Server
title: 347; label: Summary
title: 352; label: Exercises
title: 353; label: Search Tool
title: 353; label: Directory Creation
title: 353; label: A Public Space on the Web
title: 353; label: 21: Project: Skill-Sharing Website
title: 355; label: Design
title: 356; label: Long Polling
title: 356; label: HTTP Interface
title: 357; label: The Server
title: 359; label: Routing
title: 359; label: Serving Files
title: 360; label: Talks as Resources
title: 362; label: Long Polling Support
title: 364; label: The Client
title: 365; label: HTML
title: 365; label: Actions
title: 366; label: Rendering Components
title: 367; label: Polling
title: 369; label: The Application
title: 370; label: Exercises
title: 371; label: Disk Persistence
title: 371; label: Comment Field Resets
title: 371; label: 22: JavaScript and Performance
title: 373; label: Staged Compilation
title: 374; label: Graph Layout
title: 374; label: Defining a Graph
title: 376; label: Force-Directed Layout
title: 377; label: Avoiding Work
title: 380; label: Profiling
title: 381; label: Function Inlining
title: 383; label: Dynamic Types
title: 384; label: Summary
title: 385; label: Exercises
title: 386; label: Prime Numbers
title: 386; label: Faster Prime Numbers
title: 386; label: Appendix: Exercise Hints
title: 387; label: Index
title: 409