Pregunta de entrevista de Zoom Communications

Describe the difference between javascript's foreach and map methods.