Amadeus interview question

How JS works? coding questions on JS