JavaScript Enlightenment [NOOK Book]

Overview

If you’re an advanced beginner or intermediate JavaScript developer, JavaScript Enlightenment will solidify your understanding of the language—especially if you use a JavaScript library. In this concise book, JavaScript expert Cody Lindley (jQuery Cookbook) provides an accurate view of the language by examining its objects and supporting nuances.

Libraries and frameworks help you build web applications quickly and efficiently, but when things go wrong or performance becomes an ...

See more details below
JavaScript Enlightenment

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study

Want a NOOK? Explore Now

NOOK Book (eBook)
$10.99
BN.com price
(Save 15%)$12.99 List Price

Overview

If you’re an advanced beginner or intermediate JavaScript developer, JavaScript Enlightenment will solidify your understanding of the language—especially if you use a JavaScript library. In this concise book, JavaScript expert Cody Lindley (jQuery Cookbook) provides an accurate view of the language by examining its objects and supporting nuances.

Libraries and frameworks help you build web applications quickly and efficiently, but when things go wrong or performance becomes an issue, knowing how and why they work is critical. If you’re ready to go under the hood and get your hands dirty with JavaScript internals, this is your book.

  • Get a short and digestible summary of ECMA-262, Edition 3, backed by real code you can run instantly
  • Examine the creation of JavaScript objects
  • Learn complex values, primitive values, scope, and inheritance
  • Understand the importance of the head object
  • Work with string, number, and Boolean objects and values
  • Discover how to use the null value and the built-in math object
  • Get into the details—beyond Mozilla’s reference guide for JavaScript 1.5
Read More Show Less

Product Details

  • ISBN-13: 9781449344436
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 12/19/2012
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 166
  • Sales rank: 1,268,528
  • File size: 4 MB

Meet the Author

Cody Lindley, a principal front-end architect with TandemSeven, has 13 years professional experience with HTML, CSS, JavaScript, Flash, and client-side performance techniques. When he’s not wielding client-side code, he’s toying with interface/interaction design and speaking at various conferences.

Read More Show Less

Table of Contents

Preface;
Introduction;
More Code, Fewer Words;
Exhaustive Code and Repetition;
Color-Coding Conventions;
jsFiddle, JS Bin, and Firebug lite-dev;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
About the Author;
About the Technical Editors;
Chapter 1: JavaScript Objects;
1.1 Creating Objects;
1.2 JavaScript Constructors Construct and Return Object Instances;
1.3 The JavaScript Native/Built-In Object Constructors;
1.4 User-Defined/Non-Native Object Constructor Functions;
1.5 Instantiating Constructors Using the new Operator;
1.6 Creating Shorthand/Literal Values from Constructors;
1.7 Primitive (a.k.a. Simple) Values;
1.8 The Primitive Values null, undefined, “string”, 10, true, and false Are Not Objects;
1.9 How Primitive Values Are Stored/Copied in JavaScript;
1.10 Primitive Values Are Equal by Value;
1.11 The String, Number, and Boolean Primitive Values Act Like Objects When Used Like Objects;
1.12 Complex (a.k.a. Composite) Values;
1.13 How Complex Values Are Stored/Copied in JavaScript;
1.14 Complex Objects Are Equal by Reference;
1.15 Complex Objects Have Dynamic Properties;
1.16 The typeof Operator Used on Primitive and Complex Values;
1.17 Dynamic Properties Allow for Mutable Objects;
1.18 All Constructor Instances Have Constructor Properties that Point to Their Constructor Function;
1.19 Verify that an Object Is an Instance of a Particular Constructor Function;
1.20 An Instance Created From a Constructor Can Have Its Own Independent Properties (Instance Properties);
1.21 The Semantics of “JavaScript Objects” and “Object() Objects”;
Chapter 2: Working with Objects and Properties;
2.1 Complex Objects Can Contain Most of the JavaScript Values as Properties;
2.2 Encapsulating Complex Objects in a Programmatically Beneficial Way;
2.3 Getting/Setting/Updating an Object’s Properties Using Dot Notation or Bracket Notation;
2.4 Deleting Object Properties;
2.5 How References to Object Properties Are Resolved;
2.6 Using hasOwnProperty, Verify That an Object Property Is Not From the Prototype Chain;
2.7 Checking If an Object Contains a Given Property Using the in Operator;
2.8 Enumerate (Loop Over) an Object’s Properties using the for in Loop;
2.9 Host Objects versus Native Objects;
2.10 Enhancing and Extending Objects with Underscore.js;
Chapter 3: Object();
3.1 Conceptual Overview of Using Object() Objects;
3.2 Object() Parameters;
3.3 Object() Properties and Methods;
3.4 Object() Object Instance Properties and Methods;
3.5 Creating Object() Objects Using “Object Literals”;
3.6 All Objects Inherit From Object.prototype;
Chapter 4: Function();
4.1 Conceptual Overview of Using Function() Objects;
4.2 Function() Parameters;
4.3 Function() Properties and Methods;
4.4 Function Object Instance Properties and Methods;
4.5 Functions Always Return a Value;
4.6 Functions Are First-Class Citizens (Not Just Syntax but Values);
4.7 Passing Parameters to a Function;
4.8 this and arguments Values Available To All Functions;
4.9 The arguments.callee Property;
4.10 The Function Instance length Property and arguments.length;
4.11 Redefining Function Parameters;
4.12 Return a Function Before It Is Done (Cancel Function Execution);
4.13 Defining a Function (Statement, Expression, or Constructor);
4.14 Invoking a Function [Function, Method, Constructor, or call() and apply()];
4.15 Anonymous Functions;
4.16 Self-Invoking Function Expression;
4.17 Self-Invoking Anonymous Function Statements;
4.18 Functions Can Be Nested;
4.19 Passing Functions to Functions and Returning Functions from Functions;
4.20 Invoking Function Statements Before They Are Defined (Function Hoisting);
4.21 A Function Can Call Itself (Recursion);
Chapter 5: The Head/Global Object;
5.1 Conceptual Overview of the Head Object;
5.2 Global Functions Contained Within the Head Object;
5.3 The Head Object versus Global Properties and Global Variables;
5.4 Referring to the Head Object;
5.5 The Head Object Is Implied and Typically Not Referenced Explicitly;
Chapter 6: The this Keyword;
6.1 Conceptual Overview of this and How It Refers to Objects;
6.2 How Is the Value of this Determined?;
6.3 The this Keyword Refers to the Head Object in Nested Functions;
6.4 Working Around the Nested Function Issue by Leveraging the Scope Chain;
6.5 Controlling the Value of this Using call() or apply();
6.6 Using the this Keyword Inside a User-Defined Constructor Function;
6.7 The this Keyword Inside a Prototype Method Refers to a Constructor Instance;
Chapter 7: Scope and Closures;
7.1 Conceptual Overview of JavaScript Scope;
7.2 JavaScript Does Not Have Block Scope;
7.3 Use var Inside Functions to Declare Variables and Avoid Scope Gotchas;
7.4 The Scope Chain (Lexical Scoping);
7.5 The Scope Chain Lookup Returns the First Found Value;
7.6 Scope Is Determined During Function Definition, not Invocation;
7.7 Closures Are Caused by the Scope Chain;
Chapter 8: Function Prototype Property;
8.1 Conceptual Overview of the Prototype Chain;
8.2 Why Care About the prototype Property?;
8.3 Prototype Is Standard on All function() Instances;
8.4 The Default prototype Property Is an Object() Object;
8.5 Instances Created From a Constructor Function are Linked to the Constructor’s prototype Property;
8.6 Last Stop in the prototype Chain is Object.prototype;
8.7 The prototype Chain Returns the First Property Match It Finds in the Chain;
8.8 Replacing the prototype Property with a New Object Removes the Default Constructor Property;
8.9 Instances That Inherit Properties from the Prototype Will Always Get the Latest Values;
8.10 Replacing the prototype Property with a New Object Does Not Update Former Instances;
8.11 User-Defined Constructors Can Leverage the Same Prototype Inheritance as Native Constructors;
8.12 Creating Inheritance Chains (the Original Intention);
Chapter 9: Array();
9.1 Conceptual Overview of Using Array() Objects;
9.2 Array() Parameters;
9.3 Array() Properties and Methods;
9.4 Array Object Instance Properties and Methods;
9.5 Creating Arrays;
9.6 Adding and Updating Values in Arrays;
9.7 Length versus Index;
9.8 Defining Arrays with a Predefined Length;
9.9 Setting Array Length can Add or Remove Values;
9.10 Arrays Containing Other Arrays (Multidimensional Arrays);
9.11 Looping Over an Array, Backwards and Forwards;
Chapter 10: String();
10.1 Conceptual Overview of Using the String() Object;
10.2 String() Parameters;
10.3 String() Properties and Methods;
10.4 String Object Instance Properties and Methods;
Chapter 11: Number();
11.1 Conceptual Overview of Using the Number() Object;
11.2 Integers and Floating-Point Numbers;
11.3 Number() Parameters;
11.4 Number() Properties;
11.5 Number Object Instance Properties and Methods;
Chapter 12: Boolean();
12.1 Conceptual Overview of Using the Boolean() Object;
12.2 Boolean() Parameters;
12.3 Boolean() Properties and Methods;
12.4 Boolean Object Instance Properties and Methods;
12.5 Non-Primitive False Boolean Objects Convert to true;
12.6 Certain Things Are false, Everything Else Is true;
Chapter 13: Working with Primitive String, Number, and Boolean Values;
13.1 Primitive/Literal Values Are Converted to Objects When Properties Are Accessed;
13.2 You Should Typically Use Primitive String, Number, and Boolean Values;
Chapter 14: Null;
14.1 Conceptual Overview of Using the null Value;
14.2 typeof Returns null Values as “object”;
Chapter 15: Undefined;
15.1 Conceptual Overview of the undefined Value;
15.2 JavaScript ECMAScript 3 Edition (and Later) Declares the undefined Variable in the Global Scope;
Chapter 16: Math Function;
16.1 Conceptual Overview of the Built-In Math Object;
16.2 Math Properties and Methods;
16.3 Math Is Not a Constructor Function;
16.4 Math Has Constants You Cannot Augment/Mutate;
Review;
Conclusion;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)