Quick actions

cmd+k|ctrl+k

Navigation

Languages

Array Object

Snippet info

Language

JavaScript

Visibility

public

Author

asepkhabril20

Created

2024-11-05T09:12:16.066404Z

Updated

2024-11-05T09:12:16.066404Z

const studentOne = {
    name : "Asep ripai",
    age : 23,
    address : [
        {
        postalCode : 41283
    },
    {
     Rt : 02   
    },
    
    {
        Rw : 01
    },
    
    ]
}

const studentTwo = {
    name : 'Dadang Hidayatullah',
    Age : 23
}

const studentTheree = {
    name : 'Lana Ismail',
    age : 21
}

const students = [studentOne, studentTwo, studentTheree];
// const peopple = students[0].address[1].Rt;
// const peopple = students[0].address;

students.forEach((siswa, i) => {
    // console.log(`isi alamat ${alamat} ada di indexke ${i}`)
    const alamat = siswa.address;
    alamat.forEach((value)=>{
       console.log(value); 
    });
});


// console.log(peopple)
INFO