Amadeus Interview Question

Simple data manipulation tasks in javascript