Pregunta de entrevista de Slab (CA)

Basic front-end programming question/problem to solve.