misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Abdulaziz Aldawsari #5

Closed Oz3Oz3 closed 5 years ago

Oz3Oz3 commented 5 years ago

//Bottle of Cokes var bottles for (var i = 99; i >= 0; i--){

            if (i == 1) {
    bottles = 'bottle';
} else {
    bottles = 'bottles';
}

if (i <= 99 && i != 0) { console.log(i + bottles +" of coke on the wall, "+ i +bottles+" of coke. Take one down and pass it around, " + (i-1) + bottles +" of coke on the wall."); } else if (i===0){ console.log("No more bottles of coke on the wall, no more bottles of coke. Go to the store and buy some more, 99 bottles of coke on the wall."); }

};

//Random Address var St_no = [1, 2, 3, 4, 5,6,7,8,9,10,11], st_name = ['C street','A street', 'B street','D street'], city = ['Riyadh','Jeddah','Dammam','Makkah','Madina'], state = ['Middle', 'Eastren','Westren'], zip = [112,111,113,114,115,116,117,118];

            var address = St_no[Math.floor(Math.random() * St_no.length)] + " " + st_name[Math.floor(Math.random() * st_name.length)] + " " + city[Math.floor(Math.random() * city.length)] +" " + state[Math.floor(Math.random() * state.length)] +" " + zip[Math.floor(Math.random() * zip.length)];

            console.log(address);
           **
morojAlh commented 5 years ago

We discussed the homework one-on-one. Good job šŸ‘šŸ¼