Typescript Last Character Javascript Interview Preparation