var newNumbers = []
var i = 0
for (let i = 1; i < 101;i++) {
if (i % 5 == 0 || i % 2 == 0) {
newNumbers.push(i);
console.log(newNumbers)
}
}
console.log(newNumbers)
var menu = {
"burger": 3.99,
"fries": 1.99,
"drink": 0.99
}
var total = 0
//shows the user the menu and prompts them to select an item
console.log("Menu")
for (var item in menu) {
console.log(item + " $" + menu[item].toFixed(2)) //why is toFixed used?
}
//ideally the code should support mutliple items
var item = "burger"
var selection = "burger"
if (selection == item){
// console.log(menu[selection])
total += menu[selection]
}
else {
console.log("Invalid Input")
}
//code should add the price of the menu items selected by the user
console.log(total)
// Copy your previous code to built alphabetList here
var alphabet = "abcdefghijklmnopqrstuvwxyz";
var alphabetList = [];
for (var i = 0; i < alphabet.length; i++) {
alphabetList.push(alphabet[i]);
}
// console.log(alphabetList);
let letterNumber = 5
for (var i = 0; i < alphabetList.length; i++) {
if (i == letterNumber) {
console.log(alphabetList[i] + " is letter number " + String(i+1) + " in the alphabet")
}
}
// Should output:
// "e" is letter number 5 in the alphabet