Slab (CA) interview question

Basic front-end programming question/problem to solve.