x = {name:"george",children:[{name:"herby",age:46},{name:"herby2",age:47} ,{name:"herby6",age:45} ]}
test = function(){
for (i = 0; i < this.children.length; i++) {
console.log("Name:" + this.children[i].name + " age:" + this.children[i].age);
}
}
test.call(x);
Name:herby age:46
Name:herby2 age:47
Name:herby6 age:45
btw - what is output when the data is thus
{name:"george",children:[{name:"herby",age:46},{name:"herby",age:46} ,{name:"herby",age:46} ]}
Wednesday, July 20, 2016
example of call setting context
multiple lines in console
shift + enter
Simple example of closure
s= function(r){
i=89;
return function(){
return i * r;
}
}
s(10)();
Tuesday, July 19, 2016
wpf form with only close button
this.ResizeMode = System.Windows.ResizeMode.NoResize;
textblock keep spaces
xml:space="preserve"
Wednesday, July 6, 2016
reset certificates for fiddler
since i cleared the cache I get all sorts of errors so I needed to do this
Subscribe to:
Comments (Atom)