misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Omar Alokali - HW1 #15

Closed OmarAlokali closed 5 years ago

OmarAlokali commented 5 years ago

1- for (var i = 99; i >= 2; i--) { var a = [i] +' bottles of coke on the wall, ' + [i] +' bottles of coke.\n'+'Take one down and pass it around,'+ [i-1] +' bottles of coke on the wall.' console.log(a) } console.log("Take one down and pass it around, no more bottles of coke on the wall.\nNo more bottles of coke on the wall, no more bottles of coke.\nGo to the store and buy some more, 99 bottles of coke on the wall.")

2- `Num = ["5514","74563","9510","125"]; St = ["Rue Royale","Irving ave","College Park","Dophtree"]; City = ["Dayton","Oakwood","Kettering","Fairborn"]; State = ["OH","NY","CA","TX"]; ZipCode = ["45429","38456","11354","78147"]

var a = Num[Math.floor(Math.random() Num.length)]; var b = St[Math.floor(Math.random() St.length)]; var c = City[Math.floor(Math.random() City.length)]; var d = State[Math.floor(Math.random() State.length)]; var e = ZipCode[Math.floor(Math.random()* ZipCode.length)];

console.log(a,b,",",c,d,",",e,"\n");`

morojAlh commented 5 years ago

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