while (bottles > 0 ){
if (bottles == 1){
word = "bottle";
}
console.log(bottles + ' bottles of coke on the wall ', bottles +' bottles of coke. Take one down and pass it around bottle ', bottles-1 , word + ' of coke on the wall.');
bottles-- ;
if (bottles == 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.");
}
}
//Assignment 2
var streetNumber = ['25489', '87459', '35478', '15975', '95125', '78965']
//Assignment 1
var bottles = 99;
var word = 'bottles';
while (bottles > 0 ){ if (bottles == 1){ word = "bottle";
} console.log(bottles + ' bottles of coke on the wall ', bottles +' bottles of coke. Take one down and pass it around bottle ', bottles-1 , word + ' of coke on the wall.'); bottles-- ;
if (bottles == 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."); } }
//Assignment 2
var streetNumber = ['25489', '87459', '35478', '15975', '95125', '78965']
var streetName = ['Tahlea street', 'Olay street', 'Thumamah street', 'King fahad street', 'Rabi street', 'King Abdulaziz street',]
var cityName = ['Riyadh', 'Dammam', 'Jedda', 'Tabouk', 'Makka', 'Maddena', 'Haiel']
var stateName = ['Qa State', 'No State', 'Ea State', 'So State', 'We State']
var zipCode = ['12889', '12459', '12748', '12005', '12625', '12465']
var streetNumber = streetNumber[Math.floor(Math.random() streetNumber.length)]; var streetName = stateName[Math.floor(Math.random() streetName.length)]; var cityName = cityName[Math.floor(Math.random() cityName.length)]; var stateName = stateName[Math.floor(Math.random() stateName.length)]; var zipCode = zipCode[Math.floor(Math.random() * zipCode.length)];
console.log(streetNumber , streetName , cityName , stateName , zipCode);