diff --git a/index.html b/index.html index d5fecde..a9ade09 100644 --- a/index.html +++ b/index.html @@ -56,15 +56,15 @@

The Bruno Store

let html = "" for (const book in items) { html += `

${book}

-

${bookData[book][0]}

-

Cost: $${bookData[book][1]}.` +

${items[book][0]}

+

Cost: $${items[book][1]}.` // Format cents. This is why I seperated the dollars and cents to two values. - var cost = bookData[book][2] + var cost = items[book][2] if (cost < 10 && cost > -1) { cost = cost.toString() cost = "0" + cost } - html += `${cost}

Buy now!

` + html += `${cost}

Buy now!

` } document.getElementById("bookcontainer").innerHTML = html