Question d’entretien chez Uber

Create custom reduce and map function in javascript.