Skip to content

Instantly share code, notes, and snippets.

@bianle
bianle / 0_reuse_code.js
Created November 13, 2015 08:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bianle
bianle / inheritance.js
Created June 9, 2016 14:29 — forked from adohe-zz/inheritance.js
A classic inheritance implementation in Node.js
/**
* A classic inheritance implementation in Node.js
*
*/
var util = require('util');
var Parent = require('./Parent');
function Child(/* [options, ] cb*/) {
if (!(this instanceof Child)) return new Child(arguments[0], arguments[1]);