Put in order · Vibe coding with Claude Code course · Module 9: Discord clone

Ordering: getHighestRole steps

Arrange the steps of how the getHighestRole function works:

Items to put in order

  • Return the first role or null
  • Filter the roles that belong to the member (filter)
  • Sort descending by position (sort)

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