Book 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. Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables. When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:
Syntax
Objects
Functions
Inheritance
Arrays
Regular expressions
Methods
Style
Beautiful features
The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.
With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.
Table of contents
-
JavaScript: The Good Parts
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- A Note Regarding Supplemental Files
- Preface
- 1. Good Parts
- 2. Grammar
- 3. Objects
- 4. Functions
- 5. Inheritance
- 6. Arrays
- 7. Regular Expressions
- 8. Methods
- 9. Style
- 10. Beautiful Features
- A. Awful Parts
- B. Bad Parts
-
C. JSLint
- Undefined Variables and Functions
- Members
- Options
- Semicolon
- Line Breaking
- Comma
- Required Blocks
- Forbidden Blocks
- Expression Statements
- for in Statement
- switch Statement
- var Statement
- with Statement
- =
- == and !=
- Labels
- Unreachable Code
- Confusing Pluses and Minuses
- ++ and −−
- Bitwise Operators
- eval Is Evil
- void
- Regular Expressions
- Constructors and new
- Not Looked For
- HTML
- JSON
- Report
- D. Syntax Diagrams
- E. JSON
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
Product information
- Title: JavaScript: The Good Parts
- Author(s):
- Release date: May 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596517748
You might also like
book
The Joy of JavaScript
Whether building interactive browser-based applications or creating server-side applications in Node, JavaScript is the most widely …
book
JavaScript Cookbook, 3rd Edition
Why reinvent the wheel every time you run into a problem with JavaScript? This cookbook is …
video
JavaScript: The Good Parts Master Class with Douglas Crockford
Javascript incorporates some of the best and worst ideas in programming languages. In this segment, Doug …
book
Modern JavaScript for the Impatient
Exploit the Power of Modern JavaScript and Avoid the Pitfalls JavaScript was originally designed for small-scale …