I have this code :
“const sortSpeciesByTeeth = arr => arr.sort((speciesObj1, speciesObj2) => speciesObj1.numTeeth > speciesObj2.numTeeth)”
I had some similar ones always given in solution because I could not figoure out the code for the exercise. But they never explain the given code just basically.
So this supposed to be an arrow function… But what is the second arrow? I cant figoure it out and I think this is the key to understand. I can’t really go on now. Maybe the first arrow is what I can’t figoure out… because there are 2 parameters but still I’m lost.
Can somebody explain it to me? Or just put me in the right direction where to find it or where can I read about this? Thanks!!