is it possible to give an id for this alert, or 1 name of this alert? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

is it possible to give an id for this alert, or 1 name of this alert?

alert (["papagaio", "elefante", "gavião", "macaco", "tubarão", "cachorro", "hipopótamo", "golfinho", "baleia", "girafa", "passarinho", "formiga", "tatu", "gambá", "tartaruga", "pinguim", "urso", "tigre", "leão", "onça", "pantera", "tamanduá", "preguiça", "cavalo", "dinossauro", "dragão", "foca", "gato", "cobra", "coelho", "galinha", "galo" , "pintinho" , "pavão", "boi", "camelo", "garça", "gaivota", "veado", "cabra", "bode", "sapo", "grilo","ZHRD"] [Math.floor (Math.random () * 44)]);

22nd May 2020, 4:18 AM
Neymar Silva
Neymar Silva - avatar
2 Answers
+ 1
You coukd set it as a function function my_alert() { alert([...]) } and use my_alert() to call it.
24th May 2020, 10:23 PM
Russ
Russ - avatar
+ 1
Thank you Russ
24th May 2020, 10:40 PM
Neymar Silva
Neymar Silva - avatar