Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
JavaScript for PHP Developers Acknowledgments Dedication Preface
Conventions Used in This Book Using Code Examples Safari® Books Online How to Contact Us
1. Introduction
Scope of This Book The Language Learning Environment
Browsers JavaScriptCore Node.js and Rhino
Longer Examples Let’s Get Started
2. JavaScript Syntax
Variables
What Does $ Do in JavaScript?
Values
typeof Introspection null and undefined
Arrays
Associative Arrays
Conditions
Ternary Operator Strict Comparison switch try-catch
while and for Loops for-in Loops Miscellaneous Operators
in String Concatenation Type Casting void Comma Operator
3. Functions
Default Parameters Any Number of Arguments arguments.length Trick Return Values Functions Are Objects A Different Syntax Scope Hoisting
Hoisting Functions
Closures
Closures in PHP
Scope Chain
The Scope Chain in the WebKit Console Retaining the Scope Retaining References, Not Values Closures in a Loop Exercise: onclick Loop
Immediate Functions
Initialization Privacy
Passing and Returning Functions
Callbacks Are Not Strings
4. Object-Oriented Programming
Constructors and Classes
Returning Objects More on This Enforcing Constructors
Prototypes Object Literals
Accessing Properties Confusing Dots Methods in Object Literals
Fancy Arrays Own Properties
__proto__ this or prototype
Inheritance
Inheritance via the Prototype Inheritance via Copying Properties Beget Object “Classical” extend() Borrowing Methods Conclusion
5. The Built-In API
The Global Object Global Properties Global Functions
Numbers Encoding URLs
Built-In Constructors
Object
toString() toLocaleString() valueOf() hasOwnProperty() propertyIsEnumerable() isPrototypeOf() constructor
Array
length push() pop() unshift() shift() concat() sort() slice() splice() reverse() join()
RegExp
test() and properties exec()
Function
Function properties
String
substring() localeCompare() split() search() replace() match()
Number Boolean Math Error Date
Constructors Review
6. ECMAScript 5
Strict Mode Property Attributes New Object APIs
Object.create() Object.getOwnPropertyDescriptor() Object.defineProperty() and Object.defineProperties() Restricting Object Mutations Looping Alternatives Object.getPrototypeOf()
Array Additions
Array.isArray() indexOf() and lastIndexOf() Walking the Array Elements Filtering Testing the Array Content Map/Reduce
String Trimming New in Date Function.prototype.bind() JSON Shims
7. JavaScript Patterns
Private Properties
Private Methods Exposing Private Objects Returning Private Arrays Deep Copy via JSON
Revealing Pattern Constants Namespaces Modules CommonJS Modules
Defining a CommonJS Module Using a CommonJS Module Using an Agnostic Module
AMD Design Patterns
Singleton
Singletons with constructors
Factory Decorator
Decoration API Adding decorators decorate() and get()
Documentation and Testing
Manual Documenting Your Code Unit Testing JSLint Linting This Book
Index About the Author Colophon Copyright
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion