console.table(groups);//prints a table of the array groups in the console
vargroups=[["Angus","Ashley","Anthony","Anna","Alicia"], ["Benny","Beau","Bernie","Betty","Bjorn"], ["Colin","Chris","Claire","Catherine","Cody"], ["Daisy","Delia","Derek","Donald","Danny"], ["Ernest","Elanor","Eliza","Eric","Elizabeth"], ["Frida","Freddy","Fiona","Finn","Fatima"]];functionsetup(){for(vari=0;i<groups.length;i++){console.log(groups[i]);//prints all the 1st dimension array of groups}}
vargroups=[["Angus","Ashley","Anthony","Anna","Alicia"], ["Benny","Beau","Bernie","Betty","Bjorn"], ["Colin","Chris","Claire","Catherine","Cody"], ["Daisy","Delia","Derek","Donald","Danny"], ["Ernest","Elanor","Eliza","Eric","Elizabeth"], ["Frida","Freddy","Fiona","Finn","Fatima"]];functionsetup(){for(vari=0;i<groups.length;i++){// console.log(groups[i]);for(varj=0;j<groups[i].length;j++) //we are iterating for the number of objects in each array{console.log(groups[i][j]);}}}
Leave a Reply