xxxxxxxxxx
18
let myChemicalRomance = ["Gerard","Frank","Mikie","Cameron","Yahir","Maddie", "Wyatt","Zoe","Helena","Cole","Jack"]
function setup() {
noCanvas();
let latestBandNumber = myChemicalRomance.length - 1
print("There are " + myChemicalRomance.length + " musicians in the band.")
print("The first member of the band is " + myChemicalRomance[0])
print("Our latest musician to join the band on tour is " + myChemicalRomance[latestBandNumber] )
//let vocalist = random(myChemicalRomance)
let vocalistNumber = floor(random(0,myChemicalRomance.length))
let vocalist = myChemicalRomance[vocalistNumber]
print("Our vocalist tonight is " + vocalist)
//arrays always start from 0 not one.
}