when I enter at the prompt 0, than I am expecting an alert "stop" but receive "go" instead. Can you help me to get the alert "stop"?
var toyota = {
make: "Toyota",
model: "Corolla",
fuel: 0,
tank: function(addingfuel) {
this.fuel = this.fuel + addingfuel;
},
start: function() {
if (this.fuel === 0) {
alert("stop");
} else {
alert("go");
}
},
};
var addingfuel = prompt("Please enter fuel added", "liter");
toyota.tank();
toyota.start();
+addingfuel;2. pass ittoyota.tank(+addingfuel);