You don't know. JavaScript (rolled up) PDF

Source: Internet
Author: User
Tags closure

: Network Disk Download

Content Introduction· · · · · ·

The JavaScript language has a lot of complex concepts, but it manifests itself in a simple way (such as a callback function), so that JavaScript developers can write full-featured programs without having to understand the internal principles of the language; like a radio, You don't have to understand what the tubes and coils are all about, and you can listen to your favorite programs as long as you operate the buttons on the radio. However, these complex and ingenious concepts of JavaScript are the essence of language, and even experienced JavaScript developers cannot really understand the nature of the language itself without serious learning. It is precisely because the overwhelming majority of people superficial understanding, the unexpected behavior is that the language itself is flawed, and then put the relevant characteristics into the blacklist, over time to exclude the diversity of the language, artificially make it become incomplete, unsafe.

"The JavaScript You don't Know" series is designed to get superficial understanding's JavaScript developers on the go, digging inside the language and figuring out what each part of JavaScript is used for. This book introduces two topics in the series: scopes and closures, and this and object prototypes. With this knowledge, you can easily understand whatever technology, framework, and popular words you have.

Author profile ...

Author Profile:

Kyle Simpson

Advocating an open Internet, in-depth research on JavaScript, HTML5, real-time/end-to-end communication and Web performance. He is an active member of technical book writers, technical trainers, lecturers, and open source communities.

Translator Profile:

Shano

Front-end engineer, front-end basic Technology group leader, was responsible for the Pea Pod 2.0 front-end architecture design and major development work, is currently responsible for front-end Technical infrastructure construction. Sina Weibo @ Shano. Responsible for the translation of "scopes and closures" in the first part of this book.

Matthew

Senior student of computer science and technology, Beihang University. Love JavaScript, Python, love open source, and enjoy doing all kinds of interesting things. Responsible for the second part of the book "This and object prototype" translation.

Catalogue ... preface VIII
First part scope and closure
Preface 2
Chapter 1th What is the scope 4
1.1 Compilation Principle 4
1.2 Understanding Scope 6
1.2.1 Actor Table 6
1.2.2 Dialogue 6
1.2.3 Compiler has words 7
1.2.4 Engine and Scope Dialog 9
1.2.5 Quiz 10
1.3 Scope Nesting 10
1.4 Exception 12
1.5 Summary 12
2nd lexical Scope 14
2.1 Lexical Stages 14
2.2 Deceptive Morphology 17
2.2.1 Eval 17
2.2.2 with 18
2.2.3 Performance 20
2.3 Summary 21
3rd Chapter function scope and block scope 22
Scope in 3.1 functions 22
3.2 Hiding internal implementations 23
3.3 Function Scope 26
3.3.1 Anonymous and named 27
3.3.2 immediately executes a function expression 28
3.4 Block Scope 30
3.4.1 with 31
3.4.2 Try/catch 31
3.4.3 Let 32
3.4.4 Const 35
3.5 Summary 36
The 4th Chapter increases 37
4.1 Chicken first or egg 37
4.2 Compiler hits 38 again
4.3 function First 40
4.4 Summary 41
5th Chapter Scope Closure 43
5.1 Revelation 43
5.2 Substantive issues 44
5.3 Now I understand 47
5.4 Loops and closures 48
5.5 Module 51
5.5.1 Modern modular Mechanism 54
5.5.2 module mechanism for the future 56
5.6 Summary 57
Appendix A dynamic Scope 58
Appendix B Block-scoped alternative Scenario 60
Appendix C This lexical 64
Appendix D Acknowledgements 67
Part two this and object prototypes
Preface 72
1th Chapter about this 74
1.1 Why to use this 74
1.2 Misunderstanding 76
1.2.1 Point to itself 76
1.2.2 It's scope 79
1.3 This what exactly is 80
1.4 Summary 80
2nd Chapter This comprehensive analysis 82
2.1 Call Position 82
2.2 Binding Rules 83
2.2.1 Default Bindings 83
2.2.2 Implicit binding 85
2.2.3 Explicit Binding 87
2.2.4 New Binding 90
2.3 Priority 91
2.4 Binding Exceptions 95
2.4.1 ignored this 96
2.4.2 Indirect Reference 97
2.4.3 Soft Binding 98
2.5 This lexical 99
2.6 Summary 101
Chapter 3rd Object 102
3.1 Syntax 102
3.2 Type 103
3.3 Content 105
3.3.1 Computed Property name 106
3.3.2 Properties and Methods 107
3.3.3 Array 108
3.3.4 Copying Objects 109
3.3.5 Property Descriptor 111
3.3.6 invariance 114
3.3.7 [[Get]] 115
3.3.8 [[Put]] 116
3.3.9 Getter and Setter 117
3.3.10 the existence of 119
3.4 Traversal 121
3.5 Summary 124
4th Hybrid Object "Class" 126
4.1 Class theory 126
4.1.1 "class" design mode 127
4.1.2 "Class" in JavaScript 128
4.2-Class mechanism 128
4.2.1 Construction 128
4.2.2 Constructor 130
4.3 Inheritance of class 130
4.3.1 Polymorphism 132
4.3.2 Multiple Inheritance 134
4.4 Mixing 134
4.4.1 Explicit Mixing 135
4.4.2 Implicit mixing 139
4.5 Summary 140
Chapter 5th prototype 142
5.1 [[Prototype]] 142
5.1.1 Object.prototype 144
5.1.2 property settings and masking 144
5.2 "Class" 146
5.2.1 "Class" function 146
5.2.2 "Constructor" 149
5.2.3 Technology 151
5.3 (prototype) Inheritance 153
5.4 Object Associations 159
5.4.1 Creating an association 159
5.4.2 Correlation is alternate 161
5.5 Summary 162
6th Act Commission 164
6.1 Delegate-oriented design 165
6.1.1 Class Theory 165
6.1.2 Commission theory 166
6.1.3 Comparative Thinking Model 170
Class 6.2 and Object 173
6.2.1 control "Class" 174
6.2.2 Delegate Control object 176
6.3 More Concise Design 178
6.4 Better Syntax 182
6.5 Introspection 185
6.6 Summary 187
Class 189 in Appendix A ES6

: Network Disk Download

You don't know. JavaScript (rolled up) PDF

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.