2
When I run the following code the commands that were to be returned in real are not.
var a = 0;
main = function(_this){
console.log('Está entrando em Main');
return function(){
console.log("Retorno"); //Não escreve o retorno
a++; //Não incrementa a variável
};
}(this);
console.log(a);
Caramba thought that with (this) would already call kkkkkkkkkk Because when I do the following works only with Self-invoking main = Function(_this){ console.log('So it only goes with the call below'); }(this);
– César Hilário
You don’t even need the
this
, but it’s just not returning a function, it’s running a direct.– Maniero