Question d’entretien chez Cvent

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