const obj = { name: 'Jean-Luc Picard', rank: 'Captain' }; // Prints "name Jean-Luc Picard" followed by "rank Captain" Object.entries(obj).forEach(entry => { const [key, value] = entry; console.log(key, value); });