Eloquent JavaScript [electronic resource] : a modern introduction to programming / Marijn Haverbeke.

Haverbeke, Marijn.
San Francisco : No Starch Press, 2011.
1 online resource (227 p.)
1st edition

Location Notes Your Loan Policy


Other records:
JavaScript (Computer program language).
Electronic books.
System Details:
text file
Eloquent JavaScript is a guide to JavaScript that focuses on good programming techniques rather than offering a mish-mash of cut-and-paste effects. The author teaches readers how to leverage JavaScript's grace and precision to write real browser-based applications. The book begins with the fundamentals of programming-variables, control structures, functions, and data structures-then moves on to more complex topics, like object-oriented programming, regular expressions, and browser events. With clear examples and a focus on elegance, Eloquent JavaScript will have the reader fluent in the langua
Brief Contents; Contents in Detail; Introduction; Chapter 1: Basic JavaScript: Values, Variables, and Control Flow; Values; Numbers; Arithmetic; Strings; Unary Operators; Boolean Values, Comparisons, and Boolean Logic; Expressions and Statements; Variables; Keywords and Reserved Words; The Environment; Functions; prompt and confirm; The print Function; Modifying the Environment; Program Structure; 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
More on TypesUndefined Values; Automatic Type Conversion; Dangers of Automatic Type Conversion; More on && and ||; Chapter 2: Functions; The Anatomy of a Function Definition; Definition Order; Local Variables; Nested Scope; The Stack; Function Values; Closure; Optional Arguments; Techniques; Avoiding Repetition; Purity; Recursion; Chapter 3: Data Structures: Objects and Arrays; The Problem: Aunt Emily's Cats; Basic Data Structures; Properties; Object Values; Objects as Sets; Mutability; Objects as Collections: Arrays; Methods; Solving the Problem of Aunt Emily's Cats; Separating Paragraphs
Finding Relevant ParagraphsExtracting Cat Names; The Full Algorithm; Cleaning Up the Code; Date Representation; Date Extraction; Gathering More Information; Data Presentation; Some More Theory; The arguments Object; Tying Up a Loose End; The Math Object; Enumerable Properties; Chapter 4: Error Handling; Types of Problems; Programmer Mistakes; Run-Time Errors; Handling Errors; Returning a Special Value; Exceptions; Cleaning Up After Exceptions; Error Objects; Unhandled Exceptions; Selective Catching; Automated Testing; Chapter 5: Functional Programming; Abstraction; Higher-Order Functions
Modifying FunctionsThe reduce Function; Mapping Arrays; The Sad Story of the Recluse; HTML; The Recluse's Text File; Finding Paragraphs; Emphasis and Footnotes; Moving the Footnotes; Generating HTML; Converting the Recluse's Book; Other Functional Tricks; Operator Functions; Partial Application; Composition; Chapter 6: Object-Oriented Programming; Objects; Defining Methods; Constructors; Building from Prototype; Constructors and Prototypes; Prototype Pollution; Objects as Dictionaries; Specifying an Interface; Building an Ecosystem Simulation; Defining the Terrarium; Points in Space
Representing the GridA Bug's Programming Interface; The Terrarium Object; this and Its Scope; Animating Life; It Moves; More Life Forms; Polymorphism; A More Lifelike Simulation; Inheritance; Keeping Track of Energy; Adding Plant Life; The Herbivore; Bringing It to Life; Artificial Stupidity; Prototypal Inheritance; Type-Definition Utilities; Prototypes as Types; A World of Objects; The instanceof Operator; Mixing Types; Chapter 7: Modularity; Modules; An Example; Modules as Files; The Shape of a Module; Functions as Local Namespaces; Module Objects; Interface Design; Predictability
Includes index.
Description based on publisher supplied metadata and other sources.