SyntaxFix
Write A Post
Hire A Developer
Questions
You're missing the return statement because if your list size is 0, the for loop will never execute, thus the if will never run, and thus you will never return.
Move the if statement out of the loop.