Skip to content

Instantly share code, notes, and snippets.

@mannuelf
Created January 10, 2017 20:32
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 mannuelf/6ff97a9d0e93ccbbcc8196de5e1546ef to your computer and use it in GitHub Desktop.
Save mannuelf/6ff97a9d0e93ccbbcc8196de5e1546ef to your computer and use it in GitHub Desktop.
In Progress Network Requests: Given an array of network objects representing network requests, assign the boolean 'true' to the variable 'inProgress' if any network request has a 'status' of 'pending'.
var requests = [
{ url: '/photos', status: 'complete' },
{ url: '/albums', status: 'pending' },
{ url: '/users', status: 'failed' }
];
var inProgress = requests.some(function(status) {
return status != 'pending';
});
console.log('value', inProgress);
// https://www.udemy.com/javascript-es6-tutorial/learn/v4/t/quiz/263440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment