DevLearn

Mastering Async/Await

From course: Advanced JavaScript Concepts


### Asynchronous JavaScript
JavaScript is single-threaded. Asynchronous operations allow your program to do things without blocking the main thread.

### The `async` and `await` keywords
`async/await` is modern syntax for handling promises, making asynchronous code look and behave more like synchronous code.

The code below fetches data from a fake API. See if you can log the user's name.
Code Editor