Open KhalilKhunji opened 1 month ago
https://github.com/3liYusuf/js-objects-lab/blob/27bc3d2301bd3029c9d81608b81de9a5647c6b91/app.js#L274
Here you are sorting by ascending order (i.e. lowest to highest hp) when the question asked for descending order (i.e. highest to lowest hp), so this should be:
game.party.sort((a, b) => b.hp - a.hp);
Oh! I didn't notice that, thank you so much.
https://github.com/3liYusuf/js-objects-lab/blob/27bc3d2301bd3029c9d81608b81de9a5647c6b91/app.js#L274
Here you are sorting by ascending order (i.e. lowest to highest hp) when the question asked for descending order (i.e. highest to lowest hp), so this should be: