misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Abdulsalam Alahmri #18

Closed salam9 closed 5 years ago

salam9 commented 5 years ago

var counter = 99, bottles ='bottles'; do { counter ==1? console.log(counter+" bottle of coke on the wall,"+counter+" "+bottles+" of coke. Take one down and pass it around, no more bottles of coke on thewall."): console.log(counter+" "+bottles+" of coke on the wall,"+counter+" "+bottles+" of coke. Take one down and pass it around,"+(counter-1)+" "+bottles+" ofcoke on the wall");

counter-=1 } while (counter >= 1);

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.");

var street = new Array( "street 1", "King Khalid Rd", "Prince Turki Ibn Abdulaziz Al Awwal Rd" ); var city = new Array( "Taif", "Riyadh", "Abha" ); var zipcode = new Array( "11234", "12233", "3212" );

console.log("street: "+street[Math.floor(Math.random()3)]+", city :"+city[Math.floor(Math.random()3)]+", zipcode :"+zipcode[Math.floor(Math.random()*3)]);

morojAlh commented 5 years ago

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