Quiero imágenes de una matriz y al cargar la ventana del navegador se muestra en la página web. Esto es lo que hice.
const players = [ { photo: 'img/photo0.jpeg' }, { photo: 'img/photo1.jpeg' }, { photo: 'img/photo2.jpeg' }] // This is the function I built to do that. function() { for(i = 0; i < players.lengh; i++;){ } }Puede acceder al método onLoad a través del objeto de window .
window.onload = function() { // Whatever you want to do on load };