// use findIndex()
let index = myArray.findIndex((item) => item.color === 'blue');
// value of index will be "1"
const seatingChartz = [
['Kristen', 'Erik', 'Namita'],
['Geoffrey', 'Juanita', 'Antonio', 'Kevin'],
['Yuma', 'Sakura', 'Jack', 'Erika']
];
for (const [index, value] of seatingChartz.entries()){
const indexArraySeatingChartz = index + 1;
console.log(`Row #: ${indexArraySeatingChartz}`);
console.log (`${value}`);
}
//=== output :
//Row #: 1
//Kristen,Erik,Namita
//Row #: 2
//Geoffrey,Juanita,Antonio,Kevin
//Row #: 3
//Yuma,Sakura,Jack,Erika
//----- by Dominikus.Heru.Sutrisno@2022 ----//