Mercurial > js4py
view core-javascript/core-javascript-work/library.js @ 154:ee0bf994ab95 core-javascript.closure-exercises
Add remove_answers.py script (and clean up closure-exercises.py).
| author | jf3243 |
|---|---|
| date | Wed, 02 Nov 2011 17:27:39 +0000 |
| parents | 20d76c716c9d |
| children | b774913eb242 |
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
