I have three unique links representing different images. I am looking to populate these links into an array so that I can display the images on my screen. How would I go about achieving this?
Here is the JavaScript code I have come up with, could you please verify if it is correct? Thanks in advance.
let cardsource = [
"<a href='https://bom.to/Qd87vw'>Card 1</a>",
"<a href='https://bom.to/P21flg'>Card 2</a>",
"<a href='https://bom.to/dFwwNw'>Card 3</a>",
];
for (var index = 0; index < cardsource.length; index++) {
console.log(cardsource[index]);
}