let text = "<table>";
for (let x in data) {
    text += "<tr><td>Recipe: " + data[x].title + "</td></tr>";
    if (data[x].image) {
        text += "<tr><td><img src='" + data[x].image + "' alt='Recipe Image'></td></tr>";
    } else {
        text += "<tr><td>Image not available</td></tr>";
    }
    text += "<tr><td>Likes: " + data[x].likes + "</td></tr>";
    text += "<tr><td>Spoonacular ID: " + data[x].id + "</td></tr>";
}
text += "</table>";
document.getElementById("recipeForm").innerHTML = text;