Split String By Character Javascript Interview