Antra Interview Question

reserve the string with js.