in terms of scope these two are identical (they are both local, not global). the difference is in functionality: the "this.func2" function is "public" (you could call that function with a reference to an instance of the Ctrl object), where as the "var func1" is a "private" function.
in terms of the speed of executing a call, I have put together this small test on jspref: http://jsperf.com/private-vs-public-speed-js
Benchmark.prototype.setup = function() {
var obj = (function() {
this.f1 = function() {
console.log('a');
}
var f2 = function() {
console.log('a')
}
return {
f1: f1,
f2: f2
}
})();
};
comparing between "use public method" obj.f1(); to "use private method" obj.f2(); does not seem to show a significant difference most of the time.