Upload
michael-girouard
View
1.990
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
JavaScriptLearningto love
Mike GirouardBarCamp Orlando
alert(‘hello world’);
var theBad = this;
JavaScript
Java!==
63reserved words
37actually used
implied global scope
+
a+b
NaN
NaN
typeof(NaN)
typeof(new Array)
var theGood = this;
[...]
{...}
f({...})
f(a)
foo || bar
!!mikeG
for ... in
obj.prototype
obj[‘foo’]
loose typing
lambdas
E.onDOMReady(function () {
// More code awesomeness
});
the “module”
MIKEG.example = (function () { var YUD = YAHOO.util.Dom;
return { foo: true, bar: function () {...}, baz: function () {...} };}) ();