• object's member

            <p>Sometime, a object's member comes from it's own definition, if it is not defined, will ask check its prototype's definition, same thing apply to the prototype, if prototype object has that definition, that is returned, if not prototype object'check its prototype object, the process continue until prototype object is undefined.</p>
    
  • apply() and call()

    v3 defines two methods that are defined for all functions, call( ) and apply( ). These methods allow you to invoke a function as if it were a method of some other object. The first argument to both call( ) and apply( ) is the object on which the function is to be invoked; this argument becomes the value of the this keyword within the body of the function. Any remaining arguments to call( ) are the values that are passed to the function that is invoked. For example, to pass two numbers to the function f( ) and invoke it as if it were a method of the object o, you could use code like this:

    f.call(o, 1, 2);
    
  • Primitive Types and Reference Types

    Numbers, boolean values, and the null and undefined types are primitive. Objects, arrays, and functions are reference types.

  • null vs undefined

    In javascript, they are different concept.

    var d ={};
    d.x = null;
    alert(d.x); //null
    alert(d.y); //undefined
    
  • Javascript notes

    Object Creation

            <p>When a function used with new, it became a constructor</p>