Could someone please explain the difference between these two:
//module
<code>
var a_module = (function() {
var private_variable = "some value";
function private_function() {
//some code
}
return {
public_property: "something"
//etc
}
}());
</code>
Could I not achieve the same thing by using class owned instance methods or class methods?
//module
<code>
var a_module = (function() {
var private_variable = "some value";
function private_function() {
//some code
}
return {
public_property: "something"
//etc
}
}());
</code>
Could I not achieve the same thing by using class owned instance methods or class methods?