Milinda Pathirage’s Blog

Computers are fascinating machines, but they’re mostly a reflection of the people using them

Secrets of the JavaScript Ninja: A sneak peak

August 15th, 2008 · No Comments · JavaScript, news

John Resig(Creator of jQuery) is working on the Secrets of the JavaScript Ninja book, which I am sure will be a great book for those who love JavaScript. Here are some sneak peak chapters given out by Manning to Ajaxian:
  1. Introduction
  2. How Closures Work
    Closures are one of the defining features of JavaScript, differentiating it from most other scripting languages. Simply: A closure is a way to access and manipulate external variables from within a function. Another way of imagining it is the fact that a function is able to access all the variables, and functions, declared in the same scope as itself...
  3. Using (function(){})()
    This article introduces the construct (function(){})() and describes its use in relationship to closures...
  4. Instantiation and Prototypes
    All functions have a prototype property which, by default, contains an empty object. This property doesn't serve a purpose until the function is instantiated. In order to understand what it does. it's important to remember the simple truth about JavaScript: Functions serve a dual purpose. They can behave both as a regular function and as a "class" (where they can be instantiated)...
  5. Class-like Code
    A common desire, for most developers, is a simplification--or abstraction--of JavaScript's inheritance system into one that they are more familiar with. This tends to head towards the realm of, what a typical developer would consider to be, Classes. While JavaScript doesn't support classical inheritance natively (at least not until JavaScript 2), generally there are a few features that developers crave...
Sphere: Related Content

Related posts brought to you by Yet Another Related Posts Plugin.

Tags:

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment