1. Scope
    1. { blocks }
      1. no scope
    2. function
      1. has scope
    3. global
      1. object
        1. in browsers
          1. window
      2. variable
        1. no var
      3. namespace
        1. use an object to organize vars and objs
          1. YOUR_OBJ={};
  2. Objects
    1. everything is objects
    2. contain
      1. data
      2. methods
    3. collection
      1. name
        1. strings
      2. value
        1. any type
        2. other objects
      3. a little database
    4. literals
      1. value
        1. any type
        2. expressions
    5. can add parameters on-fly to any object
    6. Linkage
      1. inheritense
        1. objects can be created linked to another object
          1. creation
          2. object(o)
          3. a new empty object with a link to object o
          4. get
          5. linked object properties
          6. this object properties
          7. set
          8. this object properties only
    7. Object.prototype
      1. all objects linked to it
      2. basic methods
        1. not useful
        2. hasOwnProperty(name)
    8. operations
      1. creation
        1. var myObject = {};
          1. var myObject = {name: "My Name", grade: 'A', level: 3};
        2. Maker Function
          1. myObject = maker("My Name", 'A', 3);
        3. new Object()
        4. object(Object.prototype)
      2. access
        1. var theName = myObject.name;
        2. var grade = myObject['grade'];
      3. compare
        1. ===
          1. compares object references, not values
        2. ==
          1. do type coercion
      4. delete
        1. delete myObject[name]
          1. deletes propety name from an object
    9. use
      1. names - strings
    10. built-in
      1. wrappers
        1. Integer
        2. Boolean
        3. String
        4. Number
  3. Arrays
    1. operations
      1. creation
        1. var myArray = [];
          1. var myArray = ['oats', 'peas', 'beans'];
        2. new Array()
      2. append
        1. myArray[myList.lenght] = "new value";
      3. delete
        1. delete array[number]
          1. removes element, but leaves a hole
      4. methods
        1. concat
        2. join
        3. pop
        4. push
        5. slice
        6. sort
        7. splice
      5. array
        1. don't work in different frames
          1. value.constructor === Array
          2. value instanceof Array
    2. Linkage
      1. inheritance
        1. Object produced from array prototype doesn't have array nature. It'll inherit array values and methods, but not its length.
      2. augment
        1. single array
          1. assign method to it
        2. all arrays
          1. assign methods to Array.prototype
    3. Array.prototype
      1. all arrays linked to it
    4. use
      1. names - integers
  4. Statements
    1. typeof(argument)
      1. returns a string
        1. note
          1. array
          2. "object"
          3. null
          4. "object"
    2. break
      1. java sintax
        1. labels
    3. for
      1. for(var i =0; i < array.lenght; i+=1)
      2. for(var name in object)
        1. name
          1. key
        2. object[name]
          1. value
        3. iterates all object properties
          1. inherited
          2. own
          3. if(object.hasOwnProperty(name)){}
    4. switch
      1. switch value
        1. numbers
        2. strings
      2. case value
        1. constant
        2. expression
    5. throw
      1. exceptions
        1. built-in
          1. Error
          2. EvalError
          3. RangeError
          4. SyntaxError
          5. TypeError
          6. URIError
        2. user
          1. { name: exceptionName, message: reason }
        3. usage
          1. constructors
          2. new Error(reason)
    6. try
      1. catch
        1. no classes
          1. one catch block
          2. exception type
    7. with
      1. advantages
        1. short-hand
      2. disadvantages
        1. confusing
          1. local
          2. global
        2. error-prone
        3. ambiguous
    8. var
      1. defines variables
      2. no types
    9. return
      1. return expression;
      2. return;
        1. return value
          1. undefined
  5. Functions
    1. inherited from Object
      1. can store
        1. name/value pairs
      2. can be passed and returned
    2. statement
      1. function foo(){}
        1. ==
          1. var foo = function foo(){};
    3. inner
      1. Static Scoping
        1. has access to outer functions params and variables
      2. Closure
        1. variables available after the outer function returned
    4. invocation
      1. arguments
        1. implicid variable
        2. can be iterated
        3. extra parameters
          1. ignored
        4. fewer parameters
          1. undefined
      2. ways to call
        1. Function
          1. functionObject(arguments)
          2. this = global object
        2. Method
          1. thisObject.methodName(arguments)
          2. this = thisObject
          3. thisObject["methodName"](arguments)
        3. Constructor
          1. new functionObject(arguments)
          2. new object created and assigned to this
          3. no explicit return
          4. return this
        4. Apply
          1. functionObject.apply(thisObject, [arguments])
    5. standard
      1. eval(argument)
        1. compiles argument
          1. calls the compiller at run time
      2. new Function(parameters, body)
        1. creates function
          1. function(parameters) {body}
        2. uses compiler
          1. similar to eval
        3. use only to compile fresh source from server
      3. DOM part
        1. alert(text)
        2. confirm(text)
        3. promt(text, default)
        4. setTimeout(func, msec)
        5. setInterval(func, msec)
        6. blocks browser stream
          1. avoid in AJAX apps
  6. RegEx
    1. syntax
      1. /regex/
  7. DOM
    1. document.write
      1. onload()
        1. before
          1. insert
        2. after
          1. replace
        3. HTML text
          1. document
    2. collections
      1. document.anchors
      2. document.applets
      3. document.embeds
      4. document.forms
      5. document.frames
      6. document.images
      7. document.plugins
      8. document.scripts
      9. document.stylesheets
    3. <script></script>
      1. attributes
        1. <!-- // -->
          1. hack
          2. Mosaic
          3. Navigator 1.0
        2. language=javascript
          1. deprecated
        3. type=text/javascript
          1. ignored
        4. src=URL
        5. don't use
      2. tips
        1. closure
          1. <body>
    4. elements
      1. attributes
        1. name
          1. identifies
          2. form
          3. data
          4. window/frame
        2. id
          1. identifies
          2. unique
    5. retrieving
      1. document.getElementById(id)
      2. document.getElementsByName(name)
      3. node.getElementsByTagName(tagName)
      4. direct access
        1. document
          1. document
        2. document.documentElement
          1. <html>
        3. document.body
          1. <body>
      5. pointers
        1. BODY
          1. H1
          2. #text
          3. H1
          4. #text
          5. P
          6. #text
    6. manipulating
      1. nodes
        1. create
          1. document.createElement(tagName)
          2. document.createTextNode(text)
          3. node.cloneNode()
          4. single
          5. node.cloneNode(true)
          6. childs
          7. not attached to document
        2. attach
          1. node.appendChild(new)
          2. node.insertBefore(new, sibling)
          3. node.replaceChild(new, old)
          4. node.innerHtml
          5. HTML text
          6. browser parses to nodes
          7. single node
          8. multiple
        3. remove
          1. node.removeChild(old)
          2. returns
          3. removed node
          4. before
          5. remove any handlers
          6. IE 6
          7. memory leaks
          8. set function
          9. null
      2. properties
        1. old scool
          1. if(my_img.complete) {my_img.src=superurl}
        2. new scool
          1. if(my_img.getAttribute('complete')){my_img.setAttribute('src',superurl)}
          2. fires event
        3. style
          1. node.className
          2. class names devided by ' '
          3. node.style.stylename
          4. stylename
          5. css style
          6. get
          7. css assigned styles
          8. IE
          9. W3C
    7. events
      1. boolean_param
      2. mouse
        1. target
          1. topmost element
          2. z-index
        2. types
          1. click
          2. dblclick
          3. mousedown
          4. mousemove
          5. mouseout
          6. mouseover
          7. mouseup
      3. input
        1. blur
        2. change
        3. focus
        4. keydown
        5. keypress
        6. keyup
        7. submit
      4. handlers
        1. classic
          1. node["on"+type]=f
          2. every browser
        2. w3c
          1. node.addEventListener(type, f, boolean_param)
          2. IE
        3. microsoft
          1. node.attachEvent("on"+type, f)
          2. IE
        4. event parameter
          1. passed to handler
          2. IE
          3. global variable
          4. event
          5. others
          6. processing
      5. dispatching
        1. pattern
          1. trickling
          2. netscape 4
          3. BODY
          4. H1
          5. DIV
          6. DIV
          7. bubling
          8. BODY
          9. H1
          10. DIV
          11. DIV
        2. set handler to parent container only
        3. stop dispatching
          1. cancel bubbling event
          2. prevent default action
    8. window
      1. global object
      2. unique for
        1. window
        2. frame
        3. iframe
      3. properties
        1. frames[]
          1. child
          2. frame
          3. iframe
        2. name
        3. opener
          1. reference
          2. creator/opener
        4. parent
        5. self
        6. top
        7. window
        8. open()
          1. new window
        9. references
      4. access another window
        1. can get reference to it
        2. document.domain === otherwindow.document.domain
  8. cross browser
    1. browser detection
      1. browsers lie
    2. feature detection
      1. reflection
      2. execute conditionally
    3. platform libraries
      1. YUI
      2. ...
  9. Inheritence
    1. protorypal
      1. has link to inherited object
    2. Pseudoclassical
      1. Constructor
        1. function
        2. this
          1. points to new object
      2. new
        1. operator
      3. prototype
        1. function member