function clone(o) { function F() {}; F.prototype = o; return new F(); }
print(clone({ a: 1, b: 2 }), true);
clone('test')
{}
function mixin(dst, src) { for (var k in src) { dst[k] = src[k]; } return dst; }
mixin({ a: 1 }, { b: 2, c: 3 })
{ "a": 1, "b": 2, "c": 3 }
mixin({}, { a: 1, b: 2 })
{ "a": 1, "b": 2 }
The console allows you to interact with the course material and examples. Use the following keys:
A special logging function is also available: