Skip to content

Instantly share code, notes, and snippets.

View twisterghost's full-sized avatar

Michael Barrett twisterghost

View GitHub Profile
@twisterghost
twisterghost / es5Extend.js
Created August 15, 2017 14:14
ES5 class extending
var assert = require('assert');
// Define parent "class"
var Parent = function Parent(name) {
this.name = name;
this.isYoung = false;
};
Parent.prototype.speak = function speak() {
console.log('Hello, my name is ' + this.name);

Keybase proof

I hereby claim:

  • I am twisterghost on github.
  • I am twisterghost (https://keybase.io/twisterghost) on keybase.
  • I have a public key ASA4gpA6b3N8-WCESHdVDBRG9_CeBBY_TXIKBPAyQ82CAAo

To claim this, I am signing this object:

{
	"result": {
		"heroes": [
			{
				"name": "npc_dota_hero_antimage",
				"id": 1
			},
			{
				"name": "npc_dota_hero_axe",