const posterTitle2 = document.getElementById('poster-2-title');
const posterTitle3 = document.getElementById('poster-3-title');
const posterTitle4 = document.getElementById('poster-4-title');
const posterTitleList = [posterTitle1, posterTitle2, posterTitle3, posterTitle4];
const titleList = ["The Last Days of American Crime", "Becky", "The Rising Hawk", "7500"];
I want to set the innerHTML of each posterTitle array element to the corresponding value in the titleList array:
eg
posterTitle1.innerHTML = "The Last Days of American Crime"
I can only figure out how to do it for one element in the array (below). I know there will be a simple solution but I just can't see it!
posterTitleList.forEach(element => element.innerHTML = titleList[0]);