Paste: js function scope

Author: ddj
Mode: javascript
Date: Wed, 21 Nov 2012 05:53:33
Plain Text |
var p = new function() {
	var thing = "private";
	function privateFunction() {
		return thing;
	}
	this.publicFunction = function() {
		return thing;
	};
};

New Annotation

Summary:
Author:
Mode:
Body: