From the eBook - Third edition
Values, types, and operators
Data structures: objects and arrays
The secret life of objects
Project: a programming language
JavaScript and the browser
The document object model
Project: a pixel art editor
Project: skill-sharing website
JavaScript and performance
From the eBook - Second edition.
Brief Contents; Contents in Detail; Introduction ; On Programming; Why Language Matters; What Is JavaScript?; Code, and What to Do with It; Overview of This Book; Typographic Conventions; Part I: Language; Chapter 1: Values, Types, and Operators; Values; Numbers; Arithmetic; Special Numbers; Strings; Unary Operators; Boolean Values; Comparisons; Logical Operators; Undefined Values; Automatic Type Conversion; Short-Circuiting of Logical Operators; Summary; Chapter 2: Program Structure; Expressions and Statements; Variables; Keywords and Reserved Words; The Environment; Functions.
The console.log FunctionReturn Values; Prompt and Confirm; Control Flow; Conditional Execution; while and do Loops; Indenting Code; for Loops; Breaking Out of a Loop; Updating Variables Succinctly; Dispatching on a Value with switch; Capitalization; Comments; Summary; Exercises; Looping a Triangle; FizzBuzz; Chess Board; Chapter 3: Functions; Defining a Function; Parameters and Scopes; Nested Scopes; Functions as Values; Declaration Notation; The Call Stack; Optional Arguments; Closure; Recursion; Growing Functions; Functions and Side Effects; Summary; Exercises; Minimum; Recursion.
Bean CountingChapter 4: Data Structures: Objects and Arrays; The Weresquirrel; Data Sets; Properties; Methods ; Objects; Mutability; The Lycanthrope's Log; Computing Correlation; Objects as Maps; The Final Analysis; Further Arrayology; Strings and Their Properties; The arguments Object; The Math Object; The Global Object; Summary; Exercises ; The Sum of a Range; Reversing an Array; A List; Deep Comparison; Chapter 5: Higher-Order Functions; Abstraction; Abstracting Array Traversal; Higher-Order Functions; Passing Along Arguments; JSON; Filtering an Array; Transforming with map.
Summarizing with reduceComposability; The Cost; Great-great-great-great-. . .; Binding; Summary; Exercises; Flattening; Mother-Child Age Difference; Historical Life Expectancy; Every and Then Some; Chapter 6: The Secret Life of Objects; History; Methods; Prototypes; Constructors; Overriding Derived Properties; Prototype Interference; Prototype-less Objects; Polymorphism; Laying Out a Table; Getters and Setters; Inheritance; The instanceof Operator; Summary; Exercises; A Vector Type; Another Cell; Sequence Interface; Chapter 7: Electronic Life; Definition; Representing Space.
A Critter's Programming InterfaceThe World Object; this and Its Scope; Animating Life; It Moves; More Life-forms; A More Lifelike Simulation; Action Handlers; Populating the New World; Bringing the World to Life; Exercises; Artificial Stupidity; Predators; Chapter 8: Bugs and Error Handling; Programmer Mistakes; Strict Mode; Testing; Debugging; Error Propagation; Exceptions; Cleaning Up After Exceptions; Selective Catching; Assertions; Summary; Exercises; Retry; The Locked Box; Chapter 9: Regular Expressions; Creating a Regular Expression; Testing for Matches; Matching a Set of Characters.
Basic Javascript : values, variables, and control flow
Data structures : objects and arrays
Object-oriented programming
Web programming : a crash course
The document object model