Pergunta de entrevista da empresa Princess Cruises

How to handle sync and async calls in javascript ?