Pregunta de entrevista de Geotab

A logical thinking question followed by a javascript question