1
For example:
function ola() {
console.log("Olá =)");
}
function executar(callback) {
// quero descobrir o nome deste callback que é passado para cá
callback();
}
executar(ola);
Thus, the execute function will execute (rsrs) the callback which, in this case, is the ola()
. What I’d like to know is: how can I, within the function executar()
, have access to the real name of callback (ola), since in this scope I only use the alias "callback" to reference any function passed as argument?
Thank you very much!
– Seu Madruga