Question d’entretien chez Lyft

Asked to recreate a standard JavaScript function from scratch.