September 2017
Intermediate to advanced
216 pages
6h 8m
English
There are some questions that you should ask yourself before going down the insertion index path:
Maintaining the sort order of collections by finding the insertion index for new or changed values is harder than sorting the collection. You can sort the collection every time you push new values or change existing values:
const usingSort = myList .push(2) .push(4) .sort();console.log('usingSort', usingSort.toJS());// -> usingSort [ 1, 2, 3, 4, 5 ]Read now
Unlock full access