Pergunta de entrevista da empresa onX

What's the difference between these two functions?