2
I have the following function:
function imprimir(id, nomeFuncao)
{
console.log('id: ', id, 'Funcão que chamou: ', nomeFuncao)
}
I want the function imprimir()
can print on console.log
the information from that function call:
function criarEvento(id, oNomeDessaFuncao)
{
imprimir(id, oNomeDessaFuncao)
}
Simulating the output of the function criarEvento();
(id: 23, Funcão que chamou: criarEvento)
I don’t understand what you want to print, give an example.
– Maniero
@bigown, I want the called function to print the name of the calling function.
– durtto
The question is because according to this description it doesn’t make sense
'Funcão que chamou: ', nomeFuncao
. My initial response interpreted one thing (actually I made the other possible interpretation that seems to be the one you really want).– Maniero
and hit the nail on the head.
– durtto