WV12: How to Not Be a JavaScript Hack

Thursday, May 17th, 2012

Speaker: Phillip Kerman

tinyurl.com/javascripthack

Scope
Hosting
Closures
Immediately invoked function
Expressions (IIFE)
Modules

Book recommendation:
– JavaScript patterns
– JavaScript: the good parts.

Get a tool with introspection. Komoto, WebStorm

Tool with Lint (to check code)

Jsfiddle – great place to play around with libraries

Unit testing: do it

Function expressions are equal to functions, but more clearly written. All values, functions, etc are objects. Functions jest have built in properties.

A function that you clan to make an instance of is a constructor.

Hoisting: list all cars at top. Since they will be placed there at runtime anyway.

Closure: function used later still have access to original vars. Trying to think how I would use this. Seems that it would cause garbage collection problems.

Prototype chain: Use object.create()
Prototype does not really create parent/child relationship.

Leave a Reply

You know you want to...