This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calculateFuel() { | |
let anotherVehicle = "yes"; | |
const mpg = 4.54609; | |
do { | |
let carsMPG = prompt('Please enter your vehicles average fuel consumption (MPG): ', 0); | |
let journeyLength = prompt('Please enter the milage of your trip to college per day: ', 0); | |
let fuelcostPerLitre = prompt('Please enter the amount you pay for fuel per litre: ', 0); |