Unlike synchronous code, asynchronous code doesn't run all at once, from beginning to end. Instead, async code schedules other code to run in the future. (In the context of code, asynchronous means "outside of normal execution order".) In JavaScript, the simplest way to run code asynchronously is with `setTimeout`. When we call `setTimeout(someFunction, 1000)`, we're telling the JavaScript runtime to call `someFunction` 1000 milliseconds (1 second) in the future. The following example prints two lines to the console: one immediately, and one after a delay created by `setTimeout`. You won't need to open your browser's built-in console to see the output. We'll show it right here, along with a timestamp for each line. ```js console.log('first'); setTimeout(() => console.log('second'), 2000); ``` Here's what happens in that example code: 1. The first `console.log` runs and prints to the console. 2. `setTimeout` creates a timer that will call our callback after 2000 ms have passed. 3. Both lines of code (`console.log` and `setTimeout`) have run, so execution ends. 4. After 2000 ms, the timeout fires and calls its callback, which prints `'second'`. (You might have noticed that sometimes the time difference in the example above isn't exactly 2000 ms. We'll talk about why that happens in a future lesson.) 5. The browser's JavaScript engine sees that there are no timers left, so the example finishes. An important thing to note is that our code finishes running, then the CPU sits idle for a while, and then our `setTimeout` callback function runs. We can see that by adding one more `console.log` call. ```js console.log('first'); setTimeout(() => console.log('second'), 2000); console.log('third'); /* 7 ms  first 9 ms  third 2009 ms  second */ ``` The `console.log` calls don't happen in the order they were written! First, all three lines are executed. The second line uses `setTimeout` to schedule our callback function to run in 2 seconds. Then the CPU sits idle for about 2 seconds, and then the callback runs and prints `'second'`.