I have an array, the value of the first element is 1.
Every time a user clicks a button, I want it to increase by 1. I have this written, but it's making the array element go from 1, to 11, to 111... and so on. How do I just get it to increase by 1. Like 1, 2, 3...
function addCake (){
quantityArray[0] += 1;
var cost= quantityArray[0] * 1.49;
document.getElementById("cart").innerHTML += "<tr id="+"cakeTotal"+"><td>"+quantityArray[0]+"</td>Cake Donut</td><td>"+"$"+cost+"</td>";
}