Contentful interview question

JavaScript refactoring