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

27th May 2022, 1:03 PM
Malick Diagne
Malick Diagne - avatar
1 Réponse
+ 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]; }
27th May 2022, 1:32 PM
SoloProg
SoloProg - avatar