Sniply Blog

Async vs Sync in JavaScript

Let’s make it super simple.

1. What does synchronous mean?

console.log("Step 1");
console.log("Step 2");
console.log("Step 3");

Output:

Step 1
Step 2
Step 3

2. What does asynchronous mean?

console.log("Step 1");

setTimeout(() => {
  console.log("Step 2 (after 2 seconds)");
}, 2000);

console.log("Step 3");

Output:

Step 1
Step 3
Step 2 (after 2 seconds)

3. Why does JavaScript care about async?


4. Quick mental model 🧠


⚡ That’s the core difference!

Async vs Sync in JavaScript · Sniply