Pregunta de entrevista de Princess Cruises

How to handle sync and async calls in javascript ?