Marvel
user_9363972
javascript
2 years ago
387 B
12
Indexable
const price = 5;
var quit = false;
var totalPrice = 0;
let person = prompt("Please enter your name : ");
while (!quit) {
let order = prompt("Input Order : ");
totalPrice += order * price;
let question = prompt("do you want to add order (yes/no) ? ");
question === "yes" ? (quit = false) : (quit = true);
}
console.log("Total for Mr/Ms.", person, " : ", totalPrice);
Editor is loading...
Leave a Comment