misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Fawaz Mashi #2

Closed fawazfm closed 5 years ago

fawazfm commented 5 years ago

var bottles; for (count = 99; count >= 1; count = count - 1) { if (count == 1) { bottles = 'bottle'; } else { bottles = 'bottles'; } console.log(count+" "+bottles+" of coke on the wall."); if (count < 99) {

    console.log(count+" "+bottles+" of coke on the wall.");
}
console.log(count+" "+bottles+" of coke.");
console.log("Take one down and pass it around, ");

if (count == 1) {
    console.log("No more bottles of coke on the wall, no more bottles of coke. Go to the sotre and buy some more, 99 bottles of coke on the wall.");
}

}


var snum = [11111, 12345, 12233, 12343, 12222, 12312]; var stname = ['Madison', 'Fourth', 'Third', 'Second']; var cname = ['philadelphia', 'Pittsburgh', 'Erie', 'Allentown']; var st = ['PA'] var zcode =[44506, 32242, 23423, 54643]

var ransnum = snum[Math.floor(Math.random()snum.length)]; var ranstname = stname[Math.floor(Math.random()stname.length)]; var rancnam = cname[Math.floor(Math.random()cname.length)]; var ranst = st[Math.floor(Math.random()st.length)]; var ranzcode = zcode[Math.floor(Math.random()*zcode.length)];

console.log(ransnum+ " "+ ranstname + " street, "+ rancnam + " " + ranst + ", "+ ranzcode);

console.log(ransnum+ " "+ ranstname + ", "+ rancnam + " " + ranst + ", "+ ranzcode);

morojAlh commented 5 years ago

We discussed the homework one-on-one. Good job 👍🏼