Under what circumstances would I choose to do this:
function foo(){
function setup(){
// do some stuff
}
function moreSetup(){
// and more and more
}
function init(){
// init stuff
}
init();
}
And under what circumstances would I prefer this?
function foo(){
function setup(){
// do some stuff
}
function moreSetup(){
// and more and more
}
function init(){
// init stuff
}
return{
init();
}
}