Pregunta de entrevista de Yahoo

basic JS questions like implement reduce in js