Pregunta de entrevista de Deliveroo

Some simple JS questions. Followed by a difficult leetcode algorithm task.