for (const [key, value] of Object.entries(object)) {
console.log(key, value);
}
const object = {a: 1, b: 2, c: 3};
for (const property in object) {
console.log(`${property}: ${object[property]}`);
}
const population = {
male: 4,
female: 93,
others: 10
};
// Iterate through the object
for (const key in population) {
if (population.hasOwnProperty(key)) {
console.log(`${key}: ${population[key]}`);
}
}
const person = {
first_name: 'Monica',
last_name: 'Geller',
phone: '915-996-9739',
email: 'monica37@gmail.com',
street: '495 Grove Street',
city: 'New York',
country: 'USA',
};
for (const key in person) {
console.log(`${key} => ${person[key]}`);
}
Array.from($('.'+$( this ).attr('id'))).forEach(function(obj){
console.log(obj);
});