Program JavaScript untuk Melakukan Loop Melalui Objek

Contoh 1: Perulangan Melalui Objek Menggunakan untuk … in // program to loop through an object using for…in loop const student = { name: ‘John’, age: 20, hobbies: [‘reading’, ‘games’, ‘coding’], }; // using for…in for (let key in student) { let value; // get the value value = student[key]; console.log(key + ” – ” […]

Read more »