setImmediate() vs setTimeout() in JavaScript

from blog Trevor I. Lasn Thoughts, | ↗ original
both setImmediate() and setTimeout() are used for scheduling tasks, but they work differently.