In javascript we can write this in several ways:
(function () {
console.log("Olá");
})();
(function () {
console.log("Olá");
}());
! function () {
console.log("Olá");
}();
void function () {
console.log("Olá");
}();
I'm working on a project in vb6, and I wanted to use something like a self-invoke function so I do not need to declare a function in the global scope of my form, so I want to call a function that I'll only use once inside this function and will not use more.
Does anyone know if there is a way to do this without using gambiarra?