Mercurial > js4py-pl
view core-javascript/core-javascript-work/library.js @ 194:2f10061fec29 javascript-exercises
$ python py/remove_answers.py
| author | jf3243 |
|---|---|
| date | Mon, 21 Nov 2011 17:27:12 +0000 |
| parents | b774913eb242 |
| children |
line wrap: on
line source
// start create var create = function(parent){ var tmp = function(){}; tmp.prototype = parent; var child = new tmp(); return child; }; // end create // start SimpleClass var SimpleClass = function(prototype){ var cls = function(){ var instance = create(prototype); instance.__init__.apply(instance, arguments); return instance; }; return cls; }; // end SimpleClass
