Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. sortMrcPlans(mrcList) {
  2. mrcList.sort(
  3. firstBy(
  4. (plan1, plan2) => plan1.rankId - plan2.rankId, -1
  5. )
  6. .thenBy(
  7. (plan1, plan2) => plan1.termMonths - plan2.termMonths, -1
  8. )
  9. .thenBy(
  10. (plan1, plan2) => plan1.endingMiles - plan2.endingMiles, -1
  11. )
  12. .thenBy(
  13. (plan1, plan2) => plan1.memberPrice - plan2.memberPrice, 1
  14. )
  15. );
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement