Put in order · Vibe coding with Claude Code course · Module 11: Spotify clone

The similarTracks function

Arrange the lines of the similarTracks function:

Items to put in order

  • export function similarTracks(track: Track, catalog: Track[], limit = 3): Track[] {
  • return catalog
  • }
  • .filter((t) => t.genre === track.genre && t.id !== track.id)
  • .slice(0, limit);

You can check the correct answer by solving this task in the CodeWorlds game.