Karat Interview Question

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