Created
June 20, 2017 20:31
-
-
Save briangonzalez/bc5afbb6651d2d55c3352e4900d2cda0 to your computer and use it in GitHub Desktop.
Revisions
-
briangonzalez created this gist
Jun 20, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // // A user has purchased products from Dollar Shave Club, // noted below in the `purchased` array. When these products // came out of our database, they were unsorted. // // Write the method below, `sortProducts`, to obtain a sorted // array of the items purchased. // const sortedReference = [ 'ITEM-1', 'ITEM-2', 'ITEM-3', 'ITEM-4', 'ITEM-5', 'ITEM-6', 'ITEM-7', 'ITEM-8', 'ITEM-9', 'ITEM-10', ]; const purchased = [ 'ITEM-3', 'ITEM-1', 'ITEM-5', 'ITEM-10', 'ITEM-8', ];