作用域,嵌套函数和闭包 <script type="text/javascript"> function foo(){ var a = 10; function bar(){ a *= 2; } bar(); return a; } </script> 在这个示例中,a定义在函数foo中,但函数bar可以访问它,因为bar也定义在foo中.当bar在foo中北调用时它可以访问a,但是如果bar是在foo外部被调用呢? <script type="…
AMD - Learning JavaScript Design Patterns [Book] - O'Reilly The overall goal for the Asynchronous Module Definition (AMD) format is to provide a solution for modular JavaScript that developers can use today. It was born out of Dojo’s real world exper…
时间 2016-01-27 05:40:46 Raymond Camden's Blog 原文 http://www.raymondcamden.com/2016/01/25/survey-results-learning-javascript/ 主题 JavaScript A few weeks back, Rebecca Murphey tweeted out a link to a survey she was running involving how people learn Ja…
The Observer Pattern The Observer is a design pattern where an object (known as a subject) maintains a list of objects depending on it (observers), automatically notifying them of any changes to state. When a subject needs to notify observers about s…
The Module Pattern Modules Modules are an integral piece of any robust application's architecture and typically help in keeping the units of code for a project both cleanly separated and organized. In JavaScript, there are several options for impleme…
The Singleton Pattern The Singleton pattern is thus known because it restricts instantiation of a class to a single object. Classically, the Singleton pattern can be implemented by creating a class with a method that creates a new instance of the cla…
In classical object-oriented programming languages, a constructor is a special method used to initialize a newly created object once memory has been allocated for it. In JavaScript, as almost everything is an object, we're most often interested in ob…
1. Understand the major trends driving the rise of deep learning.2. Be able to explain how deep learning is applied to supervised learning.3. Understand what are the major categories of models (such as CNNs and RNNs), and when they should be applied.…