Rangle.io: React Training
gitbook
gitbook
  • Introduction
  • Setup
  • Functional JavaScript
  • ES6 constructs
    • Default Params
    • Template Literals
    • Destructuring
    • Arrow Functions
    • Promises
    • let and const
    • Modules
  • Thinking in Components
    • Atomic Design
    • Atomic Component Principles
    • Benefits of This Approach
    • The Process
    • Task #1
  • React Components
    • Stateless Components
    • Stateful Components
    • Stateful vs Stateless Components
    • Composition
    • Task #2
    • Task #3
    • Task #4
    • Task #5
  • Immutable
    • What Is Immutability?
    • The Case for Immutability
    • JavaScript Solutions
      • Object.assign
      • Object.freeze
    • Immutable.js Basics
      • Immutable.Map
        • Map.merge
      • Nested Objects
        • Deleting Keys
        • Maps are Iterable
      • Immutable.List
      • Performance
      • Persistent and Transient Data Structures
      • Official Documentation
    • Exercises
      • Task #1
      • Task #2
      • Task #3
      • Task #4
      • Task #5
      • Task #6
      • Task #7
  • Redux
    • Review of Reducers and Pure Functions
    • Redux Reducers
    • Redux Actions
    • Configuring your Application to use Redux
    • Using Redux with Components
    • Redux and Component Architecture
  • Routing
    • React Router
    • Router Redux
  • Forms
    • Redux Form
  • Testing
    • Setup
    • Components
    • Reducers
    • Actions
Powered by GitBook
On this page
  • Generate a list of users with brown eyes
  • Answer

Was this helpful?

  1. Immutable
  2. Exercises

Task #4

Generate a list of users with brown eyes

Expected Result

[
  {
    "_id": "56e18ce6dc7d5ade1e3c7889",
    "index": 1,
    "guid": "7ceca65c-cc8d-4f88-ab00-b5d00b72e27f",
    "isActive": true,
    "balance": "$1,423.68",
    "picture": "http://placehold.it/32x32",
    "age": 35,
    "eyeColor": "brown",
    "name": {
      "first": "Schmidt",
      "last": "Floyd"
    },
    "company": "ANIXANG",
    "email": "schmidt.floyd@anixang.org",
    "phone": "+1 (913) 595-3119",
    "address": "274 Norfolk Street, Freeburn, Nevada, 1869",
    "about": "Exercitation deserunt quis commodo ad qui aliqua proident mollit labore mollit. Deserunt occaecat in pariatur mollit aute consequat reprehenderit in deserunt magna ad. Aliquip labore do mollit officia laboris in aliquip magna aliqua. Sunt occaecat eiusmod ea amet dolore consectetur aute consequat adipisicing et nisi fugiat. Aute eiusmod quis duis ipsum occaecat culpa eiusmod Lorem amet laborum occaecat adipisicing minim. Labore exercitation laborum sint enim veniam labore officia. Aliquip do esse consectetur amet.",
    "registered": "Sunday, October 12, 2014 8:17 AM",
    "latitude": "-3.271053",
    "longitude": "-124.321634",
    "tags": [
      7,
      "veniam"
    ],
    "range": [
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9
    ],
    "friends": [
      3,
      {
        "id": 1,
        "name": "Mccall Petersen"
      }
    ],
    "greeting": "Hello, Schmidt! You have 9 unread messages.",
    "favoriteFruit": "apple"
  }
]

Answer

PreviousTask #3NextTask #5

Last updated 6 years ago

Was this helpful?