Pregunta de entrevista de Karat

some javascript question .. made use of split().