OReilly.Dojo.The.Definitive.Guide notes

1:
bop = [4,5,6,5,6, foo]; // bop contains a nested Array
dojo.indexOf(bop, foo); //5, because (a reference to) foo is contained in bop
dojo.indexOf(bop, [1,2,3]); //-1, because foo is not the same object as [1,2,3]


2:
var a = new Array(1,2,3,...);
//A lot of extra typing for very little purpose
a.forEach(function(x) {console.log(x);}); //approach one
//A lot less typing so that you can get work done quickly
a.forEach("console.log(item)"); //approach two

你可能感兴趣的:(dojo)