Skip to content

Instantly share code, notes, and snippets.

@himynameisdave
Created May 20, 2017 21:20
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 himynameisdave/0df6eac32228d98e6c317e52b00927f2 to your computer and use it in GitHub Desktop.
Save himynameisdave/0df6eac32228d98e6c317e52b00927f2 to your computer and use it in GitHub Desktop.
Reduce your fears about .reduce() - Sample Data Set
const users = [
{
firstName: 'Bob',
lastName: 'Doe',
age: 37,
}, {
firstName: 'Rita',
lastName: 'Smith',
age: 21,
}, {
firstName: 'Rick',
lastName: 'Fish',
age: 28,
}, {
firstName: 'Betty',
lastName: 'Bird',
age: 44,
}, {
firstName: 'Joe',
lastName: 'Grover',
age: 22,
}, {
firstName: 'Jill',
lastName: 'Pill',
age: 19,
}, {
firstName: 'Sam',
lastName: 'Smith',
age: 22,
}
// Let's just pretend the list goes on....
// Also I am terrible at making up names, I mean come on two of those surnames are animals smh…
];
export default users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment