Skip to content

Instantly share code, notes, and snippets.

@alinarezrangel
alinarezrangel / class.js
Created October 12, 2016 23:11
Fake JavaScript classes (ES5 or ES6)
function Extends(base, child)
{
'use strict';
if((typeof base !== 'object') || (typeof child !== 'object'))
{
throw new TypeError('Error at Extend(base, child): the base or the child arent objects');
}
child._super = {};
for(let i in base)
{