annotate js/create.js @ 162:77e87f1b5811 core-javascript

$ hg merge core-javascript.closure-exercises # done, at least for now
author jf3243
date Wed, 09 Nov 2011 17:00:38 +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 };