title: How to sort the array of objects using several keys at the same time?
body: <p>I have an array of objects, each has <code>name</code>, <code>skill</code> and <code>talent</code> keys.
  It looks like this:</p>
  <pre><code> let defaultArray = [
    {name='person1', skill = 6, talent = 3},
    {name='person2', skill = 5, talent = 5},
    {name='person3', skill = 4, talent = 6},
    {name='person4', skill = 2, talent = 7},
    {name='person5', skill = 1, talent = 4},
    {name='person6', skill = 3, talent = 1},
    {name='person7', skill = 6, talent = 2}
  ]
  </code></pre>
  <p>I need to sort it so that I only have the array of the three best persons defined by their skills, like so:</p>
  <pre><code>let resultArray = [
    {name='person1', skill = 6, talent = 3},
    {name='person7', skill = 6, talent = 2},
    {name='person2', skill = 5, talent = 5},
  ]
  </code></pre>
  <p>As you see if someone's skills are the same (like for <code>person1</code> and <code>person7</code> in the <code>defaultArray</code>),
  then persons are sorted by <code>talent</code> instead.</p>
  <hr />
  <p>Can someone, please, help me make a concise function taking <code>defaultArray</code> as a parameter and returning <code>resultArray</code> taking into account that the <code>skill</code> and <code>talent</code> values can be completely random?</p>