An exercise in problem solving in the functional idiom.
-
If you haven't release your lodown library to
npm
(node package manager), follow the steps in this video to do so: -
FORK this repository on GitHub to your own GitHub account.
-
From your FORK, use SSH to clone the repository into a Blank Cloud9 workspace.
-
Once the Cloud9 workspace is finished initializing, from the bash terminal, run the command:
npm install
-
Install your lodown library by running the command and replacing
<my-user-name>
:npm install --save lodown-<my-user-name>
-
Open up
index.js
and import your lodown library using the noderequire()
method.
Code and test your solutions in index.js
. Customer data is available to you in the Array, customers
. Utilizing your lodown library, write functions that take the Array of customers and return the following:
- number of males.
- number of females
- oldest customer, youngest customer
- average balance
- how many customer's names begin with some letter
- how many customer's friend's names begin with some letter
- how many customers are friends
- users have tags associated with them: find the top 3 most common tags
- create a summary of genders, the output should be:
{
male: 3,
female: 4,
transgender: 1
}
Remember, in the node.js environment, you can both console.log()
or use the dubugger to step through your code and inspect your work.