Synchronous and asynchronous in JavaScript with example