Pregunta de entrevista de Cvent

Flatten Object using array reduce method , why arrow functions are used?