Question d’entretien chez Atishay

Can you explain the difference between synchronous and asynchronous programming in JavaScript? Can you give examples of when to use each?