Start here · In your browser · challenge 2 of 2 in this lesson

Finds the highest total

A code cell with the real Luau runner grades it. No Studio needed.

Open

Level 3, Professional

Challenge

Find the player with the most coins in a dictionary, with a fair rule for ties.

Start from
The code cell below the challenge, which runs a hidden test when you press Run.
Check it here
Run the code cell; the challenge completes when it passes. No Studio needed.

Done means

  • Finds the highest total
  • Breaks ties alphabetically, whatever order the loop visits keys in
  • Returns nil for an empty table
Luau
Ctrl Enter runs the cell. Checked by tests