annotate js/create.js @ 194:2f10061fec29 javascript-exercises

$ python py/remove_answers.py
author jf3243
date Mon, 21 Nov 2011 17:27:12 +0000
parents 95ef8898e43e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
95
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
1 var _create_fn = function(){};
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
2 var create = function(parent){
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
3
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
4 _create_fn.prototype = parent;
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
5 var instance = new _create_fn();
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
6 return instance;
95ef8898e43e Add two sample JavaScript files and teaser.tex.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
7 };