learning async and sync event on nodejs