Skip to content

Instantly share code, notes, and snippets.

View mbilokonsky's full-sized avatar

Mykola Bilokonsky mbilokonsky

View GitHub Profile
@mbilokonsky
mbilokonsky / gist:4325454
Created December 18, 2012 06:03
sample composition OOP in JS
function Task(name) {
var self = this;
self.getName = function() { return name; }
self.getAsigner = function() { return 'Frank'; }
self.getAssignee = function() { return 'Joe'; }
self.foo = function() { return 'bar'; }
}
function TimedTask(name, startTime) {
var self = this;