Get String After Index Javascript Interview Coding