24. Example: borrowing from Array
function f() {
var args = [].slice.call(arguments, 1, 3);
return args;
}
>>> f(1, 2, 3, 4, 5, 6)
2,3
[].slice.call
can also be
Array.prototype.slice.call
25. Inheritance by copying properties
function extend(parent, child) {
var i, child = child || {};
for (i in parent) {
child[i] = parent[i];
}
return child;
}