onX Interview Question

What's the difference between these two functions?