0
I have this following variable:
Site = {
Alert: function(titulo, conteudo, data){
var id = Math.round(Math.random()*10000);
}
}
I’d like to access it anywhere in my code, specifically here:
User = {
ConfirmSair: function(){
alert(id);
}
}
How can I do that?
n worked that your way there.
– Paulo Sérgio Filho
@Paulosérgiofilho can you explain what did not work? My suggestion does not work unless you have understood my answer. But if you create an example that reproduces your problem I can show you how to make it work.
– Sergio