const $ = (id) => document.getElementById(id); $("title-img").src = `images/ted${Math.ceil(Math.random() * 3)}.jpg`; document.querySelectorAll("img.media").forEach((item) => { item.addEventListener("click", () => { item.requestFullscreen(); }); });