Open this example in the interactive library
Source code
async function fetchData() {
const response = await fetch('https://api.example.com/data');
const data = await response.json();
return data;
}
const person = {
name: 'John',
age: 30,
};
console.log(Object.entries(person));
// Output: [["name", "John"], ["age", 30]]
