Pregunta de entrevista de eBay

Coding related question in Js