Put in order · Vibe coding with Claude Code course · Module 12: Medium clone
Sorting a copy of the highlights
Put in order, in one line, the sorting of highlights without changing the array from props:
Items to put in order
- [...highlights]
- const sorted =
- .sort(
- (a, b) => a.start - b.start);
You can check the correct answer by solving this task in the CodeWorlds game.