misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Hussam Dehathim #26

Closed SamDe4574 closed 5 years ago

SamDe4574 commented 5 years ago

//Random Address function getrandom(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; }

var streetNum = [13466,19823,17039]; var streetName = ["A2 Street","B1 Street","D5 Street"]; var cityName = ["Vigo","Granada","Bilbo"]; var stateName = ["Galicia","Basque Country","Andalusia"]; var zipCode = [44793,33945,10620];

console.log(streetNum[getrandom(0,2)]+" "

//99 Bottles of Coke for(var i = 99; i >= 0; i--) { 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."); }else if (i == 1) { console.log(i + " bottle of coke on the wall," + i + " bottle of coke. Take one down and pass it around," + " no more bottles of coke on the wall."); }else{ 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."); } }

morojAlh commented 5 years ago

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