
JavaScript for PHP Developers
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Acknowledgments
- Preface
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Chapter 1. Introduction
- Scope of This Book
- The Language
- Learning Environment
- Browsers
- JavaScriptCore
- Node.js and Rhino
- Longer Examples
- Let's Get Started
- Chapter 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
- Chapter 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
- Chapter 4. Object-Oriented Programming
- Constructors and Classes
- Returning Objects
- 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
- Chapter 5. The Built-In API
- The Global Object
- Global Properties
- Global Functions
- Numbers
- Encoding URLs
- Built-In Constructors
- Object
- Array
- RegExp
- Function
- String
- Number
- Boolean
- Math
- Error
- Date
- Constructors Review
- Chapter 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
- Chapter 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
- Factory
- Decorator
- Documentation and Testing
- Manual
- Documenting Your Code
- Unit Testing
- JSLint
- Linting This Book
- Index
- About the Author
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.