Skip to content

Instantly share code, notes, and snippets.

@myogeshchavan97
Created November 13, 2019 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myogeshchavan97/16ec90d546983d3e537b744a69d8156b to your computer and use it in GitHub Desktop.
Save myogeshchavan97/16ec90d546983d3e537b744a69d8156b to your computer and use it in GitHub Desktop.
Console grouping
axios.get('https://randomuser.me/api/?page=1&results=5')
.then(response => {
const users = response.data;
users.results.forEach(user => {
const name = user.name;
const location = user.location;
const email = user.email;
console.groupCollapsed('User Details');
console.log(name);
console.log(location);
console.log(email);
console.groupEnd('User Details');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment