I think I understood. I just read that numbers are considered strings of characters, so 10 comes before 3 because 1 < 3. Damn, always the syntax…
Thank you for asking me to check, I would had never imagined that.
Once you implement the correct sort function, you need to realize that as soon as a return statement is executed, the function exits regardless if the for loop is complete. Currently, your for loop only ever iterates over the first element before exiting and returning a value.
FYI - This challenge can actually be solved without sorting the array at all, but most users do use the sort method as part of a solution.