0
Good morning sir. I want to display two images interact js like this code with src array. Thanks you sir
Display two images https://code.sololearn.com/WcGtECAUzU3N/?ref=app
1 Resposta
+ 1
// Goos Luck
let imgs = [
"https://mimo.app/i/panda.png",
"https://mimo.app/i/kittles.png"]
let img = document.querySelector ("img");
window.onload = function (){
let r = Math.floor(Math.random() * imgs.length);
for (let i=0;i<2;i++) img.src = imgs[r];
}