Узнать сколько активных пользователей JS

209
26 апреля 2018, 09:55

Узнать можно через поле isActive у каждого пользователя. Функция должна посчитать сколько isActive: true

import users from './users';
/**
 * @param {Object} user   Объект пользователя
 * 
 * @return {String}       Возвращает шаблонную строку
 */
function getNameAndEmail(user) {
    return `${user.name} ${user.email}`;
}
/**
 * @param {Object} user   Объект пользователя
 * 
 * @return {Array} tags   Возвращает массив тегов
 */
function getTags(user) {
    let tags = user.tags;
    return tags;
}
/**
 * @param {Object} user   Объект пользователя
 * 
 * @return {Object} location        Пример: {lat: 61.498616, long: 61.498616}
 */
function getLocation(user) {
    // code
    return location;
}
/**
 * @param {Object} user    Объект пользователя
 * 
 * @return {Boolean} isActive       Пример: false или true
 */
function getUserIsActive(user) {
    // code
    return isActive;
}
/**
 * @param {Array} users    Массив пользователей
 * 
 * @return {Number} countUsersActive      Пример: 7
     */
    function getUsersActive(users) {
        // code
        return countUsersActive; 
    }

for (let i = 0; i < users.length; i++) {
    let user = users[i];
    console.log(getNameAndEmail(user));
    console.log(getTags(user));
}

export default [ 
  { 
    "_id": "5a58d21ccb3c3f594dab0afc", 
    "index": 0, 
    "guid": "7a4bab55-9cee-4765-bc02-b71b2bd0880e", 
    "isActive": false, 
    "balance": "$1,890.50", 
    "picture": "http://placehold.it/32x32", 
    "age": 28, 
    "eyeColor": "green", 
    "name": "Contreras Bond", 
    "gender": "male", 
    "company": "SNORUS", 
    "email": "contrerasbond@snorus.com", 
    "phone": "+1 (918) 491-3228", 
    "address": "508 Kenilworth Place, Elliott, Louisiana, 3316", 
    "about": "Amet ipsum mollit quis velit anim dolor eu. Cillum aliquip ullamco officia exercitation fugiat laboris aliquip eu anim elit sint. Cupidatat eu pariatur enim eiusmod.\r\n", 
    "registered": "2017-09-24T04:26:20 -03:00", 
    "latitude": 61.498616, 
    "longitude": -95.315267, 
    "tags": [ 
      "nisi", 
      "enim", 
      "ea", 
      "anim", 
      "aute", 
      "duis", 
      "deserunt" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Hale Wynn" 
      }, 
      { 
        "id": 1, 
        "name": "Deidre Sheppard" 
      }, 
      { 
        "id": 2, 
        "name": "Schroeder Lynch" 
      } 
    ], 
    "greeting": "Hello, Contreras Bond! You have 3 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c52dc0461eb0e45f6", 
    "index": 1, 
    "guid": "b78a6e7e-f89d-4bb5-88a0-97bacf381718", 
    "isActive": true, 
    "balance": "$2,173.91", 
    "picture": "http://placehold.it/32x32", 
    "age": 25, 
    "eyeColor": "brown", 
    "name": "Grant Melendez", 
    "gender": "male", 
    "company": "VISUALIX", 
    "email": "grantmelendez@visualix.com", 
    "phone": "+1 (901) 518-3105", 
    "address": "999 Coleridge Street, Devon, Maryland, 2862", 
    "about": "Commodo sint laborum cillum officia proident dolor. Pariatur ex tempor et dolore do sunt ad velit. Esse proident voluptate quis voluptate. Ipsum veniam laboris in eu adipisicing aliqua magna excepteur. Quis non laboris sit aute id incididunt id sint commodo ut reprehenderit. Nulla pariatur occaecat adipisicing adipisicing occaecat dolore.\r\n", 
    "registered": "2017-12-11T11:20:28 -02:00", 
    "latitude": -68.316946, 
    "longitude": -46.465678, 
    "tags": [ 
      "culpa", 
      "eiusmod", 
      "fugiat", 
      "esse", 
      "eu", 
      "amet", 
      "in" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Harper Mckee" 
      }, 
      { 
        "id": 1, 
        "name": "Adela Decker" 
      }, 
      { 
        "id": 2, 
        "name": "Guy Roman" 
      } 
    ], 
    "greeting": "Hello, Grant Melendez! You have 2 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c927e4d55b829b301", 
    "index": 2, 
    "guid": "155f7c73-dbf1-4514-b326-d7b35b6614bd", 
    "isActive": false, 
    "balance": "$1,754.01", 
    "picture": "http://placehold.it/32x32", 
    "age": 26, 
    "eyeColor": "brown", 
    "name": "Cheri Donaldson", 
    "gender": "female", 
    "company": "PEARLESSA", 
    "email": "cheridonaldson@pearlessa.com", 
    "phone": "+1 (854) 588-3655", 
    "address": "818 Frost Street, Cumberland, Idaho, 7153", 
    "about": "Elit aliqua enim laborum aliquip elit anim tempor esse pariatur amet velit. Voluptate excepteur incididunt labore cupidatat esse labore sunt consectetur minim reprehenderit ex veniam. Esse dolor ad duis veniam qui incididunt. Occaecat eu veniam excepteur labore deserunt labore id ipsum aliqua dolor eiusmod nisi. Duis ipsum cillum ut duis. Excepteur mollit ut anim sunt id in aute id. Occaecat cupidatat voluptate ut consequat qui occaecat.\r\n", 
    "registered": "2017-11-05T02:08:21 -02:00", 
    "latitude": 78.649928, 
    "longitude": 146.86923, 
    "tags": [ 
      "anim", 
      "elit", 
      "adipisicing", 
      "eu", 
      "excepteur", 
      "proident", 
      "reprehenderit" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Mills Sawyer" 
      }, 
      { 
        "id": 1, 
        "name": "Bessie Mckenzie" 
      }, 
      { 
        "id": 2, 
        "name": "Weeks Goodwin" 
      } 
    ], 
    "greeting": "Hello, Cheri Donaldson! You have 4 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
 
  { 
    "_id": "5a58d21c3798f6bf0c08238a", 
    "index": 9, 
    "guid": "1abd8634-9962-468f-b825-b07757b41f51", 
    "isActive": false, 
    "balance": "$2,147.55", 
    "picture": "http://placehold.it/32x32", 
    "age": 37, 
    "eyeColor": "brown", 
    "name": "Downs Stevens", 
    "gender": "male", 
    "company": "KROG", 
    "email": "downsstevens@krog.com", 
    "phone": "+1 (852) 535-2687", 
    "address": "205 Congress Street, Southview, Oregon, 2145", 
    "about": "Anim eu tempor deserunt duis consectetur ipsum sint est aliquip non anim laborum ex. Labore ea exercitation laboris labore qui commodo id qui id in incididunt. Do in nulla proident nisi culpa laboris tempor nisi amet culpa. In sint officia ipsum enim ea elit ullamco anim irure. Consequat non Lorem tempor nostrud ea sit. Nostrud elit tempor duis veniam exercitation sint.\r\n", 
    "registered": "2017-05-07T11:36:55 -03:00", 
    "latitude": -89.984524, 
    "longitude": -109.008152, 
    "tags": [ 
      "ex", 
      "minim", 
      "fugiat", 
      "duis", 
      "occaecat", 
      "nulla", 
      "nisi" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Perkins Santana" 
      }, 
      { 
        "id": 1, 
        "name": "Ward Gay" 
      }, 
      { 
        "id": 2, 
        "name": "Sheryl Logan" 
      } 
    ], 
    "greeting": "Hello, Downs Stevens! You have 6 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c384b243fc45424c5", 
    "index": 10, 
    "guid": "89c0cd23-2aad-455d-96c9-f9d2efbee972", 
    "isActive": false, 
    "balance": "$3,536.45", 
    "picture": "http://placehold.it/32x32", 
    "age": 36, 
    "eyeColor": "green", 
    "name": "Pate Harris", 
    "gender": "male", 
    "company": "STELAECOR", 
    "email": "pateharris@stelaecor.com", 
    "phone": "+1 (979) 406-3003", 
    "address": "341 Borinquen Pl, Groveville, Arkansas, 3974", 
    "about": "Reprehenderit velit cillum amet Lorem pariatur mollit. Reprehenderit quis occaecat adipisicing aute. Magna enim id duis nostrud magna cupidatat cupidatat esse sunt. Elit reprehenderit voluptate nostrud reprehenderit aliqua duis Lorem consequat incididunt culpa nisi anim. In anim cillum non consectetur officia labore. Dolore id cillum consectetur exercitation.\r\n", 
    "registered": "2014-05-22T04:45:29 -03:00", 
    "latitude": 12.570123, 
    "longitude": 3.615191, 
    "tags": [ 
      "aliquip", 
      "do", 
      "id", 
      "velit", 
      "est", 
      "officia", 
      "ex" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Velma Mason" 
      }, 
      { 
        "id": 1, 
        "name": "Walls Adams" 
      }, 
      { 
        "id": 2, 
        "name": "Ross Davidson" 
      } 
    ], 
    "greeting": "Hello, Pate Harris! You have 5 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c4435aa4fdf88b2a1", 
    "index": 11, 
    "guid": "b2ae6b07-3628-4390-8a09-b2d27f9cf7ed", 
    "isActive": true, 
    "balance": "$1,665.27", 
    "picture": "http://placehold.it/32x32", 
    "age": 29, 
    "eyeColor": "green", 
    "name": "Johnnie Goodman", 
    "gender": "female", 
    "company": "PARCOE", 
    "email": "johnniegoodman@parcoe.com", 
    "phone": "+1 (865) 462-3409", 
    "address": "734 Hornell Loop, Topanga, Alabama, 5231", 
    "about": "Reprehenderit ut excepteur id officia minim aute ut irure id eu sit voluptate in. Sit duis cillum minim pariatur ex eiusmod in anim voluptate Lorem duis. Pariatur minim elit nostrud duis exercitation ut excepteur deserunt ea adipisicing ex sint dolor. Veniam laboris enim consequat est ex. In in anim mollit culpa ex.\r\n", 
    "registered": "2016-07-17T10:17:21 -03:00", 
    "latitude": -25.077333, 
    "longitude": -89.32154, 
    "tags": [ 
      "occaecat", 
      "ipsum", 
      "labore", 
      "aute", 
      "ad", 
      "veniam", 
      "nisi" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Kitty Jensen" 
      }, 
      { 
        "id": 1, 
        "name": "Pacheco Mccullough" 
      }, 
      { 
        "id": 2, 
        "name": "Bird Holmes" 
      } 
    ], 
    "greeting": "Hello, Johnnie Goodman! You have 6 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c91ef993f00aad9b6", 
    "index": 12, 
    "guid": "d1e70019-bff3-4128-91e8-9f7bc1bc5e6c", 
    "isActive": false, 
    "balance": "$2,099.97", 
    "picture": "http://placehold.it/32x32", 
    "age": 40, 
    "eyeColor": "green", 
    "name": "Holland Randall", 
    "gender": "male", 
    "company": "ISOSURE", 
    "email": "hollandrandall@isosure.com", 
    "phone": "+1 (824) 583-2290", 
    "address": "582 Garfield Place, Callaghan, North Dakota, 5246", 
    "about": "Occaecat minim eiusmod elit nostrud nulla. Elit sint quis aute aliqua elit sit voluptate aliqua. Lorem ea qui nisi ut ut.\r\n", 
    "registered": "2016-05-15T07:35:18 -03:00", 
    "latitude": -51.152209, 
    "longitude": 149.291143, 
    "tags": [ 
      "ipsum", 
      "et", 
      "amet", 
      "cillum", 
      "commodo", 
      "quis", 
      "esse" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Marlene Hodge" 
      }, 
      { 
        "id": 1, 
        "name": "Sherri Webster" 
      }, 
      { 
        "id": 2, 
        "name": "Cherry Hayden" 
      } 
    ], 
    "greeting": "Hello, Holland Randall! You have 8 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c16fb45fafb41db70", 
    "index": 13, 
    "guid": "6258f9fb-441b-4c29-ac44-c9b9fc6989f6", 
    "isActive": true, 
    "balance": "$3,046.60", 
    "picture": "http://placehold.it/32x32", 
    "age": 32, 
    "eyeColor": "brown", 
    "name": "Garza Drake", 
    "gender": "male", 
    "company": "FLYBOYZ", 
    "email": "garzadrake@flyboyz.com", 
    "phone": "+1 (985) 481-2900", 
    "address": "131 Herkimer Court, Roberts, Ohio, 614", 
    "about": "Cupidatat consequat excepteur laborum laborum cillum reprehenderit consequat adipisicing laboris. Culpa commodo sit culpa magna nulla labore laboris enim tempor incididunt ipsum sunt est. Quis pariatur eiusmod ea laborum fugiat.\r\n", 
    "registered": "2016-12-29T07:09:33 -02:00", 
    "latitude": -17.072918, 
    "longitude": 33.548097, 
    "tags": [ 
      "laborum", 
      "eiusmod", 
      "id", 
      "ipsum", 
      "anim", 
      "excepteur", 
      "proident" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Janice Chambers" 
      }, 
      { 
        "id": 1, 
        "name": "Donovan Curry" 
      }, 
      { 
        "id": 2, 
        "name": "Sheri Frost" 
      } 
    ], 
    "greeting": "Hello, Garza Drake! You have 5 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c9000f2fa6fda8f05", 
    "index": 14, 
    "guid": "452f71db-cc7e-4ce4-96a3-382b8c645440", 
    "isActive": true, 
    "balance": "$3,852.27", 
    "picture": "http://placehold.it/32x32", 
    "age": 38, 
    "eyeColor": "green", 
    "name": "Mavis Bartlett", 
    "gender": "female", 
    "company": "BEZAL", 
    "email": "mavisbartlett@bezal.com", 
    "phone": "+1 (850) 403-2902", 
    "address": "394 Covert Street, Edneyville, Oklahoma, 2538", 
    "about": "Veniam irure consectetur consectetur in consectetur labore voluptate velit mollit enim in. In irure occaecat officia commodo tempor proident do non aliqua eu quis labore. Do quis consectetur Lorem eu adipisicing adipisicing fugiat eiusmod incididunt proident et. Aute aliquip consequat exercitation ad sunt esse nostrud est aliqua ea aliqua. Nisi amet voluptate eu adipisicing veniam. Tempor excepteur reprehenderit ipsum minim do veniam aliqua. Voluptate eiusmod Lorem amet nostrud dolore sunt proident dolor mollit reprehenderit laborum.\r\n", 
    "registered": "2016-05-29T10:16:00 -03:00", 
    "latitude": 50.717803, 
    "longitude": 61.533973, 
    "tags": [ 
      "ut", 
      "do", 
      "laboris", 
      "occaecat", 
      "excepteur", 
      "aliqua", 
      "Lorem" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Dotson Medina" 
      }, 
      { 
        "id": 1, 
        "name": "Lynda Holloway" 
      }, 
      { 
        "id": 2, 
        "name": "Gay Cain" 
      } 
    ], 
    "greeting": "Hello, Mavis Bartlett! You have 10 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c9e936c68a4a4678a", 
    "index": 15, 
    "guid": "b29883ed-13ac-47a9-8f8e-e62f959dda4e", 
    "isActive": true, 
    "balance": "$2,937.09", 
    "picture": "http://placehold.it/32x32", 
    "age": 39, 
    "eyeColor": "brown", 
    "name": "Bowers Hester", 
    "gender": "male", 
    "company": "GEEKOLOGY", 
    "email": "bowershester@geekology.com", 
    "phone": "+1 (829) 548-2979", 
    "address": "733 Kansas Place, Juntura, Washington, 7444", 
    "about": "Enim sit quis sit pariatur incididunt incididunt velit occaecat ex commodo laboris incididunt. Commodo occaecat et aute est aliquip sit commodo deserunt. Exercitation esse dolore duis incididunt excepteur ex. Dolore tempor aliqua voluptate quis excepteur ad veniam Lorem minim velit. Culpa laborum qui pariatur voluptate. Consectetur exercitation nulla nostrud minim id ea consectetur ad. Enim consectetur cupidatat et cillum ullamco eiusmod ut proident irure consequat fugiat deserunt nulla ipsum.\r\n", 
    "registered": "2015-05-02T04:58:25 -03:00", 
    "latitude": -46.610747, 
    "longitude": -35.666063, 
    "tags": [ 
      "deserunt", 
      "reprehenderit", 
      "laboris", 
      "dolor", 
      "quis", 
      "id", 
      "ipsum" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Betsy David" 
      }, 
      { 
        "id": 1, 
        "name": "Dona Carpenter" 
      }, 
      { 
        "id": 2, 
        "name": "Bridges Pittman" 
      } 
    ], 
    "greeting": "Hello, Bowers Hester! You have 4 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c2619159b5affbec9", 
    "index": 16, 
    "guid": "01524110-2b92-4be1-a78a-bc70a5d0e35b", 
    "isActive": true, 
    "balance": "$2,929.45", 
    "picture": "http://placehold.it/32x32", 
    "age": 25, 
    "eyeColor": "brown", 
    "name": "Sellers Cobb", 
    "gender": "male", 
    "company": "MAXEMIA", 
    "email": "sellerscobb@maxemia.com", 
    "phone": "+1 (849) 494-2366", 
    "address": "392 Cropsey Avenue, Nelson, Pennsylvania, 6151", 
    "about": "Lorem quis nisi ea ex et exercitation commodo mollit. Irure deserunt qui qui ex ex sunt Lorem laboris nisi ad adipisicing ullamco consectetur exercitation. Eiusmod ex dolor labore duis cupidatat mollit.\r\n", 
    "registered": "2017-01-06T03:23:36 -02:00", 
    "latitude": -88.571542, 
    "longitude": -67.935765, 
    "tags": [ 
      "sunt", 
      "incididunt", 
      "ea", 
      "id", 
      "cillum", 
      "minim", 
      "nostrud" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Teresa Rocha" 
      }, 
      { 
        "id": 1, 
        "name": "Webster Wells" 
      }, 
      { 
        "id": 2, 
        "name": "Cohen Emerson" 
      } 
    ], 
    "greeting": "Hello, Sellers Cobb! You have 10 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c211872721e663044", 
    "index": 17, 
    "guid": "736a0735-9e86-4d78-a633-5de59af378b4", 
    "isActive": false, 
    "balance": "$3,536.37", 
    "picture": "http://placehold.it/32x32", 
    "age": 21, 
    "eyeColor": "green", 
    "name": "Lindsay Padilla", 
    "gender": "male", 
    "company": "EYERIS", 
    "email": "lindsaypadilla@eyeris.com", 
    "phone": "+1 (982) 414-3276", 
    "address": "349 Harwood Place, Babb, Florida, 8592", 
    "about": "Non exercitation et elit do commodo incididunt commodo ipsum fugiat incididunt occaecat. Tempor ut do enim ut duis aute non aliqua est fugiat excepteur voluptate et. Commodo veniam ea elit laborum reprehenderit commodo qui velit exercitation ut exercitation nisi ullamco. Nostrud consectetur nisi sit ipsum quis consequat pariatur veniam esse labore excepteur consequat. Pariatur duis ea aliqua consectetur ut consequat magna excepteur sint ea. Sit eiusmod occaecat ad consequat. Proident excepteur et dolore Lorem occaecat eu.\r\n", 
    "registered": "2016-08-14T05:51:23 -03:00", 
    "latitude": -68.195142, 
    "longitude": 76.616325, 
    "tags": [ 
      "labore", 
      "duis", 
      "nisi", 
      "in", 
      "non", 
      "Lorem", 
      "et" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Richmond Humphrey" 
      }, 
      { 
        "id": 1, 
        "name": "Elsie Dudley" 
      }, 
      { 
        "id": 2, 
        "name": "Morales Villarreal" 
      } 
    ], 
    "greeting": "Hello, Lindsay Padilla! You have 2 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21ce3dd95f324c6bf27", 
    "index": 18, 
    "guid": "84da2f00-8584-4db9-83ed-583c45b2a61a", 
    "isActive": false, 
    "balance": "$3,308.25", 
    "picture": "http://placehold.it/32x32", 
    "age": 28, 
    "eyeColor": "blue", 
    "name": "Alejandra Gould", 
    "gender": "female", 
    "company": "ZENTRY", 
    "email": "alejandragould@zentry.com", 
    "phone": "+1 (900) 579-3251", 
    "address": "459 Crosby Avenue, Kempton, North Carolina, 1384", 
    "about": "Consequat commodo in anim enim ea eiusmod commodo mollit quis. Cupidatat ex ut laborum commodo pariatur tempor. Et eu amet laboris qui dolor irure. Duis culpa labore sit proident ullamco sint nostrud ea amet sunt velit. Duis aute fugiat amet et ullamco proident magna occaecat deserunt reprehenderit nostrud ad. Ullamco cupidatat ad eiusmod ea cupidatat consequat consequat nisi. Exercitation ipsum minim dolor duis nisi cupidatat incididunt adipisicing consectetur ex eiusmod sit ut.\r\n", 
    "registered": "2016-06-19T03:22:32 -03:00", 
    "latitude": -10.774353, 
    "longitude": 70.523694, 
    "tags": [ 
      "tempor", 
      "id", 
      "nisi", 
      "labore", 
      "Lorem", 
      "nisi", 
      "voluptate" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Phoebe Cervantes" 
      }, 
      { 
        "id": 1, 
        "name": "Guerra Bryant" 
      }, 
      { 
        "id": 2, 
        "name": "Bruce Gamble" 
      } 
    ], 
    "greeting": "Hello, Alejandra Gould! You have 5 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c877e1b6d1c554f41", 
    "index": 19, 
    "guid": "bc0c58d5-6795-429e-a180-d2b0ee990704", 
    "isActive": false, 
    "balance": "$1,985.37", 
    "picture": "http://placehold.it/32x32", 
    "age": 21, 
    "eyeColor": "green", 
    "name": "Ruiz Macdonald", 
    "gender": "male", 
    "company": "MOBILDATA", 
    "email": "ruizmacdonald@mobildata.com", 
    "phone": "+1 (892) 593-3609", 
    "address": "819 Veranda Place, Matheny, Northern Mariana Islands, 3038", 
    "about": "Sunt est ipsum fugiat laboris magna reprehenderit irure elit velit irure incididunt ex sint. Sit esse adipisicing sint veniam consequat ipsum nisi velit eiusmod aliquip deserunt consectetur irure excepteur. Voluptate officia dolor pariatur sunt veniam minim irure ad consequat. Laborum eu irure minim incididunt velit irure consequat excepteur adipisicing dolore tempor anim ut. Sunt exercitation minim ad pariatur incididunt magna cupidatat dolor. Est veniam ea commodo dolore tempor eiusmod esse. Voluptate reprehenderit eu deserunt ex elit officia ullamco nostrud ipsum do velit nisi sint.\r\n", 
    "registered": "2017-09-29T04:04:41 -03:00", 
    "latitude": 48.544967, 
    "longitude": -23.35608, 
    "tags": [ 
      "anim", 
      "mollit", 
      "velit", 
      "eiusmod", 
      "et", 
      "sint", 
      "pariatur" 
    ], 
    "friends": [ 
      { 
        "id": 0, 
        "name": "Shawn Roach" 
      }, 
      { 
        "id": 1, 
        "name": "Amy Norton" 
      }, 
      { 
        "id": 2, 
        "name": "Cline Grant" 
      } 
    ], 
    "greeting": "Hello, Ruiz Macdonald! You have 7 unread messages.", 
    "favoriteFruit": "apple" 
  } 
]
<html> 
    <head> 
        <script src="index.pack.js"></script> 
    </head> 
    <body></body> 
</html>

Answer 1

function countUsersActive(users) { 
  return users.filter((u) => u.isActive).length; 
} 
 
var users = [{ 
    "_id": "5a58d21ccb3c3f594dab0afc", 
    "index": 0, 
    "guid": "7a4bab55-9cee-4765-bc02-b71b2bd0880e", 
    "isActive": false, 
    "balance": "$1,890.50", 
    "picture": "http://placehold.it/32x32", 
    "age": 28, 
    "eyeColor": "green", 
    "name": "Contreras Bond", 
    "gender": "male", 
    "company": "SNORUS", 
    "email": "contrerasbond@snorus.com", 
    "phone": "+1 (918) 491-3228", 
    "address": "508 Kenilworth Place, Elliott, Louisiana, 3316", 
    "about": "Amet ipsum mollit quis velit anim dolor eu. Cillum aliquip ullamco officia exercitation fugiat laboris aliquip eu anim elit sint. Cupidatat eu pariatur enim eiusmod.\r\n", 
    "registered": "2017-09-24T04:26:20 -03:00", 
    "latitude": 61.498616, 
    "longitude": -95.315267, 
    "tags": [ 
      "nisi", 
      "enim", 
      "ea", 
      "anim", 
      "aute", 
      "duis", 
      "deserunt" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Hale Wynn" 
      }, 
      { 
        "id": 1, 
        "name": "Deidre Sheppard" 
      }, 
      { 
        "id": 2, 
        "name": "Schroeder Lynch" 
      } 
    ], 
    "greeting": "Hello, Contreras Bond! You have 3 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c52dc0461eb0e45f6", 
    "index": 1, 
    "guid": "b78a6e7e-f89d-4bb5-88a0-97bacf381718", 
    "isActive": true, 
    "balance": "$2,173.91", 
    "picture": "http://placehold.it/32x32", 
    "age": 25, 
    "eyeColor": "brown", 
    "name": "Grant Melendez", 
    "gender": "male", 
    "company": "VISUALIX", 
    "email": "grantmelendez@visualix.com", 
    "phone": "+1 (901) 518-3105", 
    "address": "999 Coleridge Street, Devon, Maryland, 2862", 
    "about": "Commodo sint laborum cillum officia proident dolor. Pariatur ex tempor et dolore do sunt ad velit. Esse proident voluptate quis voluptate. Ipsum veniam laboris in eu adipisicing aliqua magna excepteur. Quis non laboris sit aute id incididunt id sint commodo ut reprehenderit. Nulla pariatur occaecat adipisicing adipisicing occaecat dolore.\r\n", 
    "registered": "2017-12-11T11:20:28 -02:00", 
    "latitude": -68.316946, 
    "longitude": -46.465678, 
    "tags": [ 
      "culpa", 
      "eiusmod", 
      "fugiat", 
      "esse", 
      "eu", 
      "amet", 
      "in" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Harper Mckee" 
      }, 
      { 
        "id": 1, 
        "name": "Adela Decker" 
      }, 
      { 
        "id": 2, 
        "name": "Guy Roman" 
      } 
    ], 
    "greeting": "Hello, Grant Melendez! You have 2 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c927e4d55b829b301", 
    "index": 2, 
    "guid": "155f7c73-dbf1-4514-b326-d7b35b6614bd", 
    "isActive": false, 
    "balance": "$1,754.01", 
    "picture": "http://placehold.it/32x32", 
    "age": 26, 
    "eyeColor": "brown", 
    "name": "Cheri Donaldson", 
    "gender": "female", 
    "company": "PEARLESSA", 
    "email": "cheridonaldson@pearlessa.com", 
    "phone": "+1 (854) 588-3655", 
    "address": "818 Frost Street, Cumberland, Idaho, 7153", 
    "about": "Elit aliqua enim laborum aliquip elit anim tempor esse pariatur amet velit. Voluptate excepteur incididunt labore cupidatat esse labore sunt consectetur minim reprehenderit ex veniam. Esse dolor ad duis veniam qui incididunt. Occaecat eu veniam excepteur labore deserunt labore id ipsum aliqua dolor eiusmod nisi. Duis ipsum cillum ut duis. Excepteur mollit ut anim sunt id in aute id. Occaecat cupidatat voluptate ut consequat qui occaecat.\r\n", 
    "registered": "2017-11-05T02:08:21 -02:00", 
    "latitude": 78.649928, 
    "longitude": 146.86923, 
    "tags": [ 
      "anim", 
      "elit", 
      "adipisicing", 
      "eu", 
      "excepteur", 
      "proident", 
      "reprehenderit" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Mills Sawyer" 
      }, 
      { 
        "id": 1, 
        "name": "Bessie Mckenzie" 
      }, 
      { 
        "id": 2, 
        "name": "Weeks Goodwin" 
      } 
    ], 
    "greeting": "Hello, Cheri Donaldson! You have 4 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
 
  { 
    "_id": "5a58d21c3798f6bf0c08238a", 
    "index": 9, 
    "guid": "1abd8634-9962-468f-b825-b07757b41f51", 
    "isActive": false, 
    "balance": "$2,147.55", 
    "picture": "http://placehold.it/32x32", 
    "age": 37, 
    "eyeColor": "brown", 
    "name": "Downs Stevens", 
    "gender": "male", 
    "company": "KROG", 
    "email": "downsstevens@krog.com", 
    "phone": "+1 (852) 535-2687", 
    "address": "205 Congress Street, Southview, Oregon, 2145", 
    "about": "Anim eu tempor deserunt duis consectetur ipsum sint est aliquip non anim laborum ex. Labore ea exercitation laboris labore qui commodo id qui id in incididunt. Do in nulla proident nisi culpa laboris tempor nisi amet culpa. In sint officia ipsum enim ea elit ullamco anim irure. Consequat non Lorem tempor nostrud ea sit. Nostrud elit tempor duis veniam exercitation sint.\r\n", 
    "registered": "2017-05-07T11:36:55 -03:00", 
    "latitude": -89.984524, 
    "longitude": -109.008152, 
    "tags": [ 
      "ex", 
      "minim", 
      "fugiat", 
      "duis", 
      "occaecat", 
      "nulla", 
      "nisi" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Perkins Santana" 
      }, 
      { 
        "id": 1, 
        "name": "Ward Gay" 
      }, 
      { 
        "id": 2, 
        "name": "Sheryl Logan" 
      } 
    ], 
    "greeting": "Hello, Downs Stevens! You have 6 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c384b243fc45424c5", 
    "index": 10, 
    "guid": "89c0cd23-2aad-455d-96c9-f9d2efbee972", 
    "isActive": false, 
    "balance": "$3,536.45", 
    "picture": "http://placehold.it/32x32", 
    "age": 36, 
    "eyeColor": "green", 
    "name": "Pate Harris", 
    "gender": "male", 
    "company": "STELAECOR", 
    "email": "pateharris@stelaecor.com", 
    "phone": "+1 (979) 406-3003", 
    "address": "341 Borinquen Pl, Groveville, Arkansas, 3974", 
    "about": "Reprehenderit velit cillum amet Lorem pariatur mollit. Reprehenderit quis occaecat adipisicing aute. Magna enim id duis nostrud magna cupidatat cupidatat esse sunt. Elit reprehenderit voluptate nostrud reprehenderit aliqua duis Lorem consequat incididunt culpa nisi anim. In anim cillum non consectetur officia labore. Dolore id cillum consectetur exercitation.\r\n", 
    "registered": "2014-05-22T04:45:29 -03:00", 
    "latitude": 12.570123, 
    "longitude": 3.615191, 
    "tags": [ 
      "aliquip", 
      "do", 
      "id", 
      "velit", 
      "est", 
      "officia", 
      "ex" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Velma Mason" 
      }, 
      { 
        "id": 1, 
        "name": "Walls Adams" 
      }, 
      { 
        "id": 2, 
        "name": "Ross Davidson" 
      } 
    ], 
    "greeting": "Hello, Pate Harris! You have 5 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c4435aa4fdf88b2a1", 
    "index": 11, 
    "guid": "b2ae6b07-3628-4390-8a09-b2d27f9cf7ed", 
    "isActive": true, 
    "balance": "$1,665.27", 
    "picture": "http://placehold.it/32x32", 
    "age": 29, 
    "eyeColor": "green", 
    "name": "Johnnie Goodman", 
    "gender": "female", 
    "company": "PARCOE", 
    "email": "johnniegoodman@parcoe.com", 
    "phone": "+1 (865) 462-3409", 
    "address": "734 Hornell Loop, Topanga, Alabama, 5231", 
    "about": "Reprehenderit ut excepteur id officia minim aute ut irure id eu sit voluptate in. Sit duis cillum minim pariatur ex eiusmod in anim voluptate Lorem duis. Pariatur minim elit nostrud duis exercitation ut excepteur deserunt ea adipisicing ex sint dolor. Veniam laboris enim consequat est ex. In in anim mollit culpa ex.\r\n", 
    "registered": "2016-07-17T10:17:21 -03:00", 
    "latitude": -25.077333, 
    "longitude": -89.32154, 
    "tags": [ 
      "occaecat", 
      "ipsum", 
      "labore", 
      "aute", 
      "ad", 
      "veniam", 
      "nisi" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Kitty Jensen" 
      }, 
      { 
        "id": 1, 
        "name": "Pacheco Mccullough" 
      }, 
      { 
        "id": 2, 
        "name": "Bird Holmes" 
      } 
    ], 
    "greeting": "Hello, Johnnie Goodman! You have 6 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c91ef993f00aad9b6", 
    "index": 12, 
    "guid": "d1e70019-bff3-4128-91e8-9f7bc1bc5e6c", 
    "isActive": false, 
    "balance": "$2,099.97", 
    "picture": "http://placehold.it/32x32", 
    "age": 40, 
    "eyeColor": "green", 
    "name": "Holland Randall", 
    "gender": "male", 
    "company": "ISOSURE", 
    "email": "hollandrandall@isosure.com", 
    "phone": "+1 (824) 583-2290", 
    "address": "582 Garfield Place, Callaghan, North Dakota, 5246", 
    "about": "Occaecat minim eiusmod elit nostrud nulla. Elit sint quis aute aliqua elit sit voluptate aliqua. Lorem ea qui nisi ut ut.\r\n", 
    "registered": "2016-05-15T07:35:18 -03:00", 
    "latitude": -51.152209, 
    "longitude": 149.291143, 
    "tags": [ 
      "ipsum", 
      "et", 
      "amet", 
      "cillum", 
      "commodo", 
      "quis", 
      "esse" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Marlene Hodge" 
      }, 
      { 
        "id": 1, 
        "name": "Sherri Webster" 
      }, 
      { 
        "id": 2, 
        "name": "Cherry Hayden" 
      } 
    ], 
    "greeting": "Hello, Holland Randall! You have 8 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c16fb45fafb41db70", 
    "index": 13, 
    "guid": "6258f9fb-441b-4c29-ac44-c9b9fc6989f6", 
    "isActive": true, 
    "balance": "$3,046.60", 
    "picture": "http://placehold.it/32x32", 
    "age": 32, 
    "eyeColor": "brown", 
    "name": "Garza Drake", 
    "gender": "male", 
    "company": "FLYBOYZ", 
    "email": "garzadrake@flyboyz.com", 
    "phone": "+1 (985) 481-2900", 
    "address": "131 Herkimer Court, Roberts, Ohio, 614", 
    "about": "Cupidatat consequat excepteur laborum laborum cillum reprehenderit consequat adipisicing laboris. Culpa commodo sit culpa magna nulla labore laboris enim tempor incididunt ipsum sunt est. Quis pariatur eiusmod ea laborum fugiat.\r\n", 
    "registered": "2016-12-29T07:09:33 -02:00", 
    "latitude": -17.072918, 
    "longitude": 33.548097, 
    "tags": [ 
      "laborum", 
      "eiusmod", 
      "id", 
      "ipsum", 
      "anim", 
      "excepteur", 
      "proident" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Janice Chambers" 
      }, 
      { 
        "id": 1, 
        "name": "Donovan Curry" 
      }, 
      { 
        "id": 2, 
        "name": "Sheri Frost" 
      } 
    ], 
    "greeting": "Hello, Garza Drake! You have 5 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c9000f2fa6fda8f05", 
    "index": 14, 
    "guid": "452f71db-cc7e-4ce4-96a3-382b8c645440", 
    "isActive": true, 
    "balance": "$3,852.27", 
    "picture": "http://placehold.it/32x32", 
    "age": 38, 
    "eyeColor": "green", 
    "name": "Mavis Bartlett", 
    "gender": "female", 
    "company": "BEZAL", 
    "email": "mavisbartlett@bezal.com", 
    "phone": "+1 (850) 403-2902", 
    "address": "394 Covert Street, Edneyville, Oklahoma, 2538", 
    "about": "Veniam irure consectetur consectetur in consectetur labore voluptate velit mollit enim in. In irure occaecat officia commodo tempor proident do non aliqua eu quis labore. Do quis consectetur Lorem eu adipisicing adipisicing fugiat eiusmod incididunt proident et. Aute aliquip consequat exercitation ad sunt esse nostrud est aliqua ea aliqua. Nisi amet voluptate eu adipisicing veniam. Tempor excepteur reprehenderit ipsum minim do veniam aliqua. Voluptate eiusmod Lorem amet nostrud dolore sunt proident dolor mollit reprehenderit laborum.\r\n", 
    "registered": "2016-05-29T10:16:00 -03:00", 
    "latitude": 50.717803, 
    "longitude": 61.533973, 
    "tags": [ 
      "ut", 
      "do", 
      "laboris", 
      "occaecat", 
      "excepteur", 
      "aliqua", 
      "Lorem" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Dotson Medina" 
      }, 
      { 
        "id": 1, 
        "name": "Lynda Holloway" 
      }, 
      { 
        "id": 2, 
        "name": "Gay Cain" 
      } 
    ], 
    "greeting": "Hello, Mavis Bartlett! You have 10 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21c9e936c68a4a4678a", 
    "index": 15, 
    "guid": "b29883ed-13ac-47a9-8f8e-e62f959dda4e", 
    "isActive": true, 
    "balance": "$2,937.09", 
    "picture": "http://placehold.it/32x32", 
    "age": 39, 
    "eyeColor": "brown", 
    "name": "Bowers Hester", 
    "gender": "male", 
    "company": "GEEKOLOGY", 
    "email": "bowershester@geekology.com", 
    "phone": "+1 (829) 548-2979", 
    "address": "733 Kansas Place, Juntura, Washington, 7444", 
    "about": "Enim sit quis sit pariatur incididunt incididunt velit occaecat ex commodo laboris incididunt. Commodo occaecat et aute est aliquip sit commodo deserunt. Exercitation esse dolore duis incididunt excepteur ex. Dolore tempor aliqua voluptate quis excepteur ad veniam Lorem minim velit. Culpa laborum qui pariatur voluptate. Consectetur exercitation nulla nostrud minim id ea consectetur ad. Enim consectetur cupidatat et cillum ullamco eiusmod ut proident irure consequat fugiat deserunt nulla ipsum.\r\n", 
    "registered": "2015-05-02T04:58:25 -03:00", 
    "latitude": -46.610747, 
    "longitude": -35.666063, 
    "tags": [ 
      "deserunt", 
      "reprehenderit", 
      "laboris", 
      "dolor", 
      "quis", 
      "id", 
      "ipsum" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Betsy David" 
      }, 
      { 
        "id": 1, 
        "name": "Dona Carpenter" 
      }, 
      { 
        "id": 2, 
        "name": "Bridges Pittman" 
      } 
    ], 
    "greeting": "Hello, Bowers Hester! You have 4 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c2619159b5affbec9", 
    "index": 16, 
    "guid": "01524110-2b92-4be1-a78a-bc70a5d0e35b", 
    "isActive": true, 
    "balance": "$2,929.45", 
    "picture": "http://placehold.it/32x32", 
    "age": 25, 
    "eyeColor": "brown", 
    "name": "Sellers Cobb", 
    "gender": "male", 
    "company": "MAXEMIA", 
    "email": "sellerscobb@maxemia.com", 
    "phone": "+1 (849) 494-2366", 
    "address": "392 Cropsey Avenue, Nelson, Pennsylvania, 6151", 
    "about": "Lorem quis nisi ea ex et exercitation commodo mollit. Irure deserunt qui qui ex ex sunt Lorem laboris nisi ad adipisicing ullamco consectetur exercitation. Eiusmod ex dolor labore duis cupidatat mollit.\r\n", 
    "registered": "2017-01-06T03:23:36 -02:00", 
    "latitude": -88.571542, 
    "longitude": -67.935765, 
    "tags": [ 
      "sunt", 
      "incididunt", 
      "ea", 
      "id", 
      "cillum", 
      "minim", 
      "nostrud" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Teresa Rocha" 
      }, 
      { 
        "id": 1, 
        "name": "Webster Wells" 
      }, 
      { 
        "id": 2, 
        "name": "Cohen Emerson" 
      } 
    ], 
    "greeting": "Hello, Sellers Cobb! You have 10 unread messages.", 
    "favoriteFruit": "strawberry" 
  }, 
  { 
    "_id": "5a58d21c211872721e663044", 
    "index": 17, 
    "guid": "736a0735-9e86-4d78-a633-5de59af378b4", 
    "isActive": false, 
    "balance": "$3,536.37", 
    "picture": "http://placehold.it/32x32", 
    "age": 21, 
    "eyeColor": "green", 
    "name": "Lindsay Padilla", 
    "gender": "male", 
    "company": "EYERIS", 
    "email": "lindsaypadilla@eyeris.com", 
    "phone": "+1 (982) 414-3276", 
    "address": "349 Harwood Place, Babb, Florida, 8592", 
    "about": "Non exercitation et elit do commodo incididunt commodo ipsum fugiat incididunt occaecat. Tempor ut do enim ut duis aute non aliqua est fugiat excepteur voluptate et. Commodo veniam ea elit laborum reprehenderit commodo qui velit exercitation ut exercitation nisi ullamco. Nostrud consectetur nisi sit ipsum quis consequat pariatur veniam esse labore excepteur consequat. Pariatur duis ea aliqua consectetur ut consequat magna excepteur sint ea. Sit eiusmod occaecat ad consequat. Proident excepteur et dolore Lorem occaecat eu.\r\n", 
    "registered": "2016-08-14T05:51:23 -03:00", 
    "latitude": -68.195142, 
    "longitude": 76.616325, 
    "tags": [ 
      "labore", 
      "duis", 
      "nisi", 
      "in", 
      "non", 
      "Lorem", 
      "et" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Richmond Humphrey" 
      }, 
      { 
        "id": 1, 
        "name": "Elsie Dudley" 
      }, 
      { 
        "id": 2, 
        "name": "Morales Villarreal" 
      } 
    ], 
    "greeting": "Hello, Lindsay Padilla! You have 2 unread messages.", 
    "favoriteFruit": "banana" 
  }, 
  { 
    "_id": "5a58d21ce3dd95f324c6bf27", 
    "index": 18, 
    "guid": "84da2f00-8584-4db9-83ed-583c45b2a61a", 
    "isActive": false, 
    "balance": "$3,308.25", 
    "picture": "http://placehold.it/32x32", 
    "age": 28, 
    "eyeColor": "blue", 
    "name": "Alejandra Gould", 
    "gender": "female", 
    "company": "ZENTRY", 
    "email": "alejandragould@zentry.com", 
    "phone": "+1 (900) 579-3251", 
    "address": "459 Crosby Avenue, Kempton, North Carolina, 1384", 
    "about": "Consequat commodo in anim enim ea eiusmod commodo mollit quis. Cupidatat ex ut laborum commodo pariatur tempor. Et eu amet laboris qui dolor irure. Duis culpa labore sit proident ullamco sint nostrud ea amet sunt velit. Duis aute fugiat amet et ullamco proident magna occaecat deserunt reprehenderit nostrud ad. Ullamco cupidatat ad eiusmod ea cupidatat consequat consequat nisi. Exercitation ipsum minim dolor duis nisi cupidatat incididunt adipisicing consectetur ex eiusmod sit ut.\r\n", 
    "registered": "2016-06-19T03:22:32 -03:00", 
    "latitude": -10.774353, 
    "longitude": 70.523694, 
    "tags": [ 
      "tempor", 
      "id", 
      "nisi", 
      "labore", 
      "Lorem", 
      "nisi", 
      "voluptate" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Phoebe Cervantes" 
      }, 
      { 
        "id": 1, 
        "name": "Guerra Bryant" 
      }, 
      { 
        "id": 2, 
        "name": "Bruce Gamble" 
      } 
    ], 
    "greeting": "Hello, Alejandra Gould! You have 5 unread messages.", 
    "favoriteFruit": "apple" 
  }, 
  { 
    "_id": "5a58d21c877e1b6d1c554f41", 
    "index": 19, 
    "guid": "bc0c58d5-6795-429e-a180-d2b0ee990704", 
    "isActive": false, 
    "balance": "$1,985.37", 
    "picture": "http://placehold.it/32x32", 
    "age": 21, 
    "eyeColor": "green", 
    "name": "Ruiz Macdonald", 
    "gender": "male", 
    "company": "MOBILDATA", 
    "email": "ruizmacdonald@mobildata.com", 
    "phone": "+1 (892) 593-3609", 
    "address": "819 Veranda Place, Matheny, Northern Mariana Islands, 3038", 
    "about": "Sunt est ipsum fugiat laboris magna reprehenderit irure elit velit irure incididunt ex sint. Sit esse adipisicing sint veniam consequat ipsum nisi velit eiusmod aliquip deserunt consectetur irure excepteur. Voluptate officia dolor pariatur sunt veniam minim irure ad consequat. Laborum eu irure minim incididunt velit irure consequat excepteur adipisicing dolore tempor anim ut. Sunt exercitation minim ad pariatur incididunt magna cupidatat dolor. Est veniam ea commodo dolore tempor eiusmod esse. Voluptate reprehenderit eu deserunt ex elit officia ullamco nostrud ipsum do velit nisi sint.\r\n", 
    "registered": "2017-09-29T04:04:41 -03:00", 
    "latitude": 48.544967, 
    "longitude": -23.35608, 
    "tags": [ 
      "anim", 
      "mollit", 
      "velit", 
      "eiusmod", 
      "et", 
      "sint", 
      "pariatur" 
    ], 
    "friends": [{ 
        "id": 0, 
        "name": "Shawn Roach" 
      }, 
      { 
        "id": 1, 
        "name": "Amy Norton" 
      }, 
      { 
        "id": 2, 
        "name": "Cline Grant" 
      } 
    ], 
    "greeting": "Hello, Ruiz Macdonald! You have 7 unread messages.", 
    "favoriteFruit": "apple" 
  } 
]; 
 
console.log(countUsersActive(users));

READ ALSO
Выбор данных для графика по клику google charts

Выбор данных для графика по клику google charts

Вот есть код: https://jsfiddlenet/3eygq8vf/1/

253
Как сделать слайдер для партнеров

Как сделать слайдер для партнеров

Что бы был адаптивный, с бесконечной и непрерывной прокруткой, для партнеровпример вот:

168
передача json в переменную с помощью axios

передача json в переменную с помощью axios

Нужно получить с сервера json-файл и записать эти данные в переменную

129