Skip to content

Instantly share code, notes, and snippets.

View daveespionage's full-sized avatar

David Cox-Espenlaub daveespionage

View GitHub Profile
@daveespionage
daveespionage / addInheritance.js
Created September 7, 2012 13:38 — forked from ElliotChong/addInheritance.js
Add inheritance to JavaScript
(function ()
{
if (!Function.prototype.inherit)
{
Function.prototype.inherit = function (p_parent)
{
if (p_parent.constructor == Function)
{
// Normal Inheritance
this.prototype = new p_parent();