For example, here’s a host function fileSize that accepts a callback function cb and can invoke that callback function both synchronously and asynchronously based on a condition:
Understanding Node.js Event-Driven Architecture
Samer Buna
2.7K15

Maybe it’s lack of coffee, but I’m failing to see what makes the calls below Sync or Async. Why is the first call of “return cb()” Sync? Because it’s not being used in a second callback function like the anon one passed to fs.stat?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.