Answer:
1 let htmlCode = `
<table>
<thead>
<tr>
<th>Movie</th>
<th>Description</th>
</tr>
</thead>
<tbody>;
2,
// initialize htmlCode variable with table header and body
let htmlCode = `
<table>
<thead>
<tr>
<th>Movie</th>
<th>Description</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
`;
// loop through the movie data and add each row to htmlCode
for (let i = 0; i < 10; i++) {
htmlCode += `
<tr>
<td><a href='${links[i]}'>${titles[i]}</a></td>
<td>${summaries[i]}</td>
<td>${ratings[i]}</td>
</tr>
`;
}
// close the table body and table
htmlCode += `
</tbody>
</table>
`;
Step-by-step explanation: