This file contains 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 characters
// 29 Sep 2017 | |
// 4 Oct 2017 - add name object example. | |
// 14 Nov 2017 - pass `a.name, b.name` to `byName()`; rename `test` as `diff`. | |
// 1 Jan 2018 - made some functions more readable. | |
// Inspired by post at https://alistapart.com/article/what-i-talk-about-when-i-talk-about-sorting | |
// which covers an example of sorting by age, but does not ensure items of same age are secondarily | |
// sorted by name in alphabetical order. | |
// This snippet shows how to do that whether names are strings or objects with first and last properties. |