onX interview question

What's the difference between these two functions?