Buying Options
JavaScript: The Good Parts
Print $29.99
Add to Cart
Print+Ebook $32.99
Add to Cart
Ebook $23.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £22.99
Add to Cart
What is this?
Description
Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole-a subset you can use to create truly extensible and efficient code.
Full Description
Table of Contents
  1. Chapter 1 Good Parts

    1. Why JavaScript?

    2. Analyzing JavaScript

    3. A Simple Testing Ground

  2. Chapter 2 Grammar

    1. Whitespace

    2. Names

    3. Numbers

    4. Strings

    5. Statements

    6. Expressions

    7. Literals

    8. Functions

  3. Chapter 3 Objects

    1. Object Literals

    2. Retrieval

    3. Update

    4. Reference

    5. Prototype

    6. Reflection

    7. Enumeration

    8. Delete

    9. Global Abatement

  4. Chapter 4 Functions

    1. Function Objects

    2. Function Literal

    3. Invocation

    4. Arguments

    5. Return

    6. Exceptions

    7. Augmenting Types

    8. Recursion

    9. Scope

    10. Closure

    11. Callbacks

    12. Module

    13. Cascade

    14. Curry

    15. Memoization

  5. Chapter 5 Inheritance

    1. Pseudoclassical

    2. Object Specifiers

    3. Prototypal

    4. Functional

    5. Parts

  6. Chapter 6 Arrays

    1. Array Literals

    2. Length

    3. Delete

    4. Enumeration

    5. Confusion

    6. Methods

    7. Dimensions

  7. Chapter 7 Regular Expressions

    1. An Example

    2. Construction

    3. Elements

  8. Chapter 8 Methods

  9. Chapter 9 Style

  10. Chapter 10 Beautiful Features

  1. Appendix Awful Parts

    1. Global Variables

    2. Scope

    3. Semicolon Insertion

    4. Reserved Words

    5. Unicode

    6. typeof

    7. parseInt

    8. +

    9. Floating Point

    10. NaN

    11. Phony Arrays

    12. Falsy Values

    13. hasOwnProperty

    14. Object

  2. Appendix Bad Parts

    1. ==

    2. with Statement

    3. eval

    4. continue Statement

    5. switch Fall Through

    6. Block-less Statements

    7. ++ −−

    8. Bitwise Operators

    9. The function Statement Versus the function Expression

    10. Typed Wrappers

    11. new

    12. void

  3. Appendix JSLint

    1. Undefined Variables and Functions

    2. Members

    3. Options

    4. Semicolon

    5. Line Breaking

    6. Comma

    7. Required Blocks

    8. Forbidden Blocks

    9. Expression Statements

    10. for in Statement

    11. switch Statement

    12. var Statement

    13. with Statement

    14. =

    15. == and !=

    16. Labels

    17. Unreachable Code

    18. Confusing Pluses and Minuses

    19. ++ and −−

    20. Bitwise Operators

    21. eval Is Evil

    22. void

    23. Regular Expressions

    24. Constructors and new

    25. Not Looked For

    26. HTML

    27. JSON

    28. Report

  4. Appendix Syntax Diagrams

  5. Appendix JSON

    1. JSON Syntax

    2. Using JSON Securely

    3. A JSON Parser

  6. Colophon

View Full Table of Contents
Product Details
Title:
JavaScript: The Good Parts
By:
Douglas Crockford
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
May 2008
Ebook Release:
December 2008
Pages:
176
Print ISBN:
978-0-596-51774-8
| ISBN 10:
0-596-51774-2
Ebook ISBN:
978-0-596-15873-6
| ISBN 10:
0-596-15873-4
Customer Reviews
About the Author
  1. Douglas Crockford

    Douglas Crockford is a Senior JavaScript Architect at Yahoo!, well known for introducing and maintaining the JSON (JavaScript Object Notation) format. He's a regular speaker at conferences on advanced JavaScript topics, and serves on the ECMAScript committee.

    View Douglas Crockford's full profile page.

Colophon

The animal on the cover of JavaScript: The Good Parts is a Plain Tiger butterfly (Danaus chrysippus).Outside of Asia, the insect is also known as the African Monarch. It is a medium-size butterfly characterized by bright orange wings with six black spots and alternating black-and-white stripes.

Its striking looks have been noted for millennia by scientists and artists. The writer Vladimir Nabokov--who was also a noted lepidopterist--had admiring words for the butterfly in an otherwise scathing New York Times book review of Alice Ford's Audubon's Butterflies, Moths, and Other Studies (The Studio Publications). In the book, Ford labels drawings made previous to and during Audubon's time in the 19th century as "scientifi-cally [sic] unsophisticated."

In response to Ford, Nabokov writes, "The unsophistication is all her own. She might have looked up John Abbot's prodigious representations of North American lepidoptera, 1797, or the splendid plates of 18th- and early-19th-century German lepidopterists.She might have traveled back some 33 centuries to the times of Tuthmosis IV or Amenophis III and, instead of the obvious scarab, found there frescoes with a marvelous Egyptian butterfly (subtly combining the pattern of our Painted Lady and the body of an African ally of the Monarch)."

While the Plain Tiger's beauty is part of its charm, its looks can also be deadly. During its larval stages, the butterfly ingests alkaloids that are poisonous to birds--its main predator--which are often attracted to the insect's markings. After ingesting the Plain Tiger, a bird will vomit repeatedly--occasionally fatally.If the bird lives, it will let other birds know to avoid the insect, which can also be recognized by its leisurely, meandering pattern of flying low to the earth.

The cover image is from Dover's Animals. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.

  • Book cover of JavaScript: The Good Parts