Pergunta de entrevista da empresa GitLab

What is the output of this code and the reason?