I realized that didn’t make sense after your reply so I re-did the code. Gist below. The 2 speciesObj are to replace the “a” and “b” used in the sort method examples (from the hint). Based on my understanding, a - b will give you ascending order but I was getting the original array back. I recalled that you said in a previous reply for a different problem that there has to be a return or console.log after curly braces and I added that for the correct result to output. @mtf you are really helping me understand all this and I can’t thank you enough.
Gist: Codecademy export · GitHub
Output:
[ { speciesName: ‘human’, numTeeth: 32 },
{ speciesName: ‘dog’, numTeeth: 42 },
{ speciesName: ‘shark’, numTeeth: 50 },
{ speciesName: ‘alligator’, numTeeth: 80 } ]