misk-jsd2 / 03-conditionals-and-loops

0 stars 10 forks source link

Thamer Alhathanni #24

Closed thaalhathanni closed 5 years ago

thaalhathanni commented 5 years ago

var streetNumbers = [954,867,766,98,43]; var streetName = [‘Rwabi’,‘Rabwa’,‘Malaz’,‘Rayan’,‘Salam’]; var cityName = [‘Riyadh’,‘Qassim’,‘Makkah’,‘Jeddah’,‘Taif’]; var RegionName = [‘Riyadh’,‘Qassim Makkah’,‘Jeddah’,‘Jazan’]; var zipCode = [5446,8788,4211,7856,9870];

var randStreetNum = streetNumbers[Math.floor(Math.random() streetNumbers.length)]; var randStreet = streetName[Math.floor(Math.random() streetName.length)]; var randCity = cityName[Math.floor(Math.random() cityName.length)]; var randRegion = stateName[Math.floor(Math.random() RegionName.length)]; var randZip = zipCode[Math.floor(Math.random() * zipCode.length)];

var randomAddress = randStreetNum+' ' + randStreet+' Street, ' + randCity+' ' + randRegion+‘, ’ + randZip console.log(randomAddress);