LTM Limited interview question

Writing a function to transform API data. Debugging a snippet of front-end code.