Was just wondering on how to add arrays, i can * it, subtract it but cant't add. Heres the code.
distance[i] = window.prompt("Please enter distance in miles");
total = distance[0] + distance[1] + distance[2] + distance[3] + distance[4]
average = total / 5
miles.push(distance);distance[i] = window.prompt("Please enter distance in miles");
total = distance[0] + distance[1] + distance[2] + distance[3] + distance[4]
average = total / 5
miles.push(distance);
console.log(miles);
document.write("calculation for "+name + "<br />Fuel consumption: " + fuel + "<br />Average distance travelled:" + average +'');}