Pregunta de entrevista de Lyft

Asked to recreate a standard JavaScript function from scratch.