Princess Cruises interview question

How to handle sync and async calls in javascript ?