I’m a complete beginner in JS and trying to figure out how to do this task. The other 5 in this lesson made perfect sense but not this one.
Is this the one about ‘Personal top when there are less than 3’ ?
Just think about it logically. The test still want you to sort the score out just like other cases, usually if there are more than 3 then you pick out the top 3, but if there are less then you just return all.
Noo sorry i should have specified. It’s about normalizing the high score.
It;s called High score board and it’s a learning exercise!
Ah i see. If you read it again, the last test don’t provide you 2 parameters anymore but one object. Think of it as a container that actually contain 2 items inside.
The first item is the score and the second item is a function, and then want you to use that function (2nd item) with the score (1st item) as its argument.
So basically what you need to figure out is how to extract those two smaller items from that container object.
Thank you! i was just having a hard time understanding that I had to extract the function and “score” key from the object. Finally made it work with your help!