Amadeus interview question

Simple data manipulation tasks in javascript