The Principles of Object - Oriented JavaScript
Сумата се прибавя директно в кошницата
5.25 €
.
CONTENTS IN DETAIL
FOREWORD by Cody Lindley xiii
ACKNOWLEDGMENTS xv
iNTRODUCTiON xvii
Who This Book Is For xviii
Overview xix
Help and Support xix
1
primitive and reference types 1
What Are Types? 2
Primitive Types 3
Identifying Primitive Types 4
Primitive Methods 6
Reference Types 6
Creating Objects 6
Dereferencing Objects 7
Adding or Removing Properties 8
Instantiating Built-in Types 8
Literal Forms 9
Object and Array Literals 9
Function Literals 10
Regular Expression Literals 11
Property Access 11
Identifying Reference Types 12
Identifying Arrays 13
Primitive Wrapper Types 14
Summary 16
2
functions 17
Declarations vs . Expressions 18
Functions as Values 19
Parameters 21
Overloading 23
Object Methods 24
The this Object 25
Changing this 26
Summary 29
3
UNDERSTANDING OBJECTS 31
Defining Properties 32
Detecting Properties 33
Removing Properties 35
Enumeration 36
Types of Properties 37
Property Attributes 38
Common Attributes 39
Data Property Attributes 40
Accessor Property Attributes 41
Defining Multiple Properties 43
Retrieving Property Attributes 44
Preventing Object Modification 45
Preventing Extensions 45
Sealing Objects 45
Freezing Objects 47
Summary 48
4
CONSTRUCTORS AND PROTOTYPES 49
Constructors 49
Prototypes 53
The [[Prototype]] Property 54
Using Prototypes with Constructors 57
Changing Prototypes 60
Built-in Object Prototypes 62
Summary 63
5
INHERITANCE 65
Prototype Chaining and Object . prototype 65
Methods Inherited from Object . prototype 66
Modifying Object . prototype 68
Object Inheritance 69
Constructor Inheritance 72
Constructor Stealing 75
Accessing Supertype Methods 77
Summary 78
6
OBJECT PATTERNS 79
Private and Privileged Members 80
The Module Pattern 80
Private Members for Constructors 82
Mixins 84
Scope-Safe Constructors 90
Summary 92



