- Browser cache. - cookie.
- Breadth-First Traversal and Depth First Traversal.
- script tag. async and defer.
- React Hook
var obj = {
a: 1,
foo: function (b) {
b = b || this.a;
return function (c) {
console.log(this.a);
console.log(b);
console.log(c);
};
},
};
var a = 2;
var obj2 = { a: 3 };
obj.foo(a).call(obj2, 1);
obj.foo.call(obj2)(1);