- Can use
Array#sort
in JavaScript - Can iterate through an Array in JavaScript
In this benchmark module, you will be writing functions to load a list of contacts, and print them out in the console. A file with some scaffolding has already been provided for you.
Complete the functions provided, such that all the specs are met.
- Contacts printed in the console must be sorted by the contact's full name
- functions
addContact
,addContacts
andprintContacts
have been implemented
Executing the file should print the following:
$ node contacts.js
Loading contact data...
...Finished loading contact data.
All Contacts:
|----------------------+--------------------------------|
| Full Name | Email Address |
|----------------------+--------------------------------|
| Ambrose Scullard | [email protected] |
| Charil Clegg | [email protected] |
| Conroy Honsch | [email protected] |
| Devon Bocking | [email protected] |
| Didi Grose | [email protected] |
| Engracia Folger | [email protected] |
| Karita Bough | [email protected] |
| Marguerite Lafayette | [email protected] |
| Mateo Da Costa | [email protected] |
| Mercy Browncey | [email protected] |
| Nessi Bywaters | [email protected] |
| Niccolo Spruce | [email protected] |
| Northrop Bauchop | [email protected] |
| Pier Waine | [email protected] |
| Shaylah Fairney | [email protected] |
| Tanny Vibert | [email protected] |
| Tova Myall | [email protected] |
| Virgina Cankett | [email protected] |
| Willdon Hedley | [email protected] |
| Winston Hixley | [email protected] |
|----------------------+--------------------------------|