title: Rank grades as object values from highest to lowest
body: <p>I want to get the first name and the gwa from each object, then arrange them according to their gwa from highest to lowest. I got the "getting the first name and gwa" part but I don't know how to arrange them according to their gwa. </p>
  
  <p>I tried to use sort() but I seems to have used it in a wrong way. Can anyone please help me?</p>
  
  <pre><code>const students = [
  {
      firstName: "Jose",
      lastName: "Valenci",
      gender: "male",
      gwa: 98, 
      interest: "tennis"
  },
  
  {
      firstName: "Debby",
      lastName: "Smith",
      gender: "female",
      gwa: 96,
      interest: "singing"
  },
  
  {
      firstName: "Zaira",
      lastName: "Pay",
      gender: "female",
      gwa: 93,
      interest: "crafts"
  }];
  
  
  const basedOnGwa = students.map ((name,grade) =&gt; {
  let{lastName} = name;
  let {gwa} = grade;
  grade = grade.sort(grade1 =&gt; {
      let {gwa} = grade1;
      return grade1;
  }); 
  
  return grade();
  })
  
  console.log(basedOnGwa);
  </code></pre>