Language concepts
setImmediate()
Node host function scheduling a callback in the check phase after polling. Relative order against timers depends on the scheduling context; not a portable browser API.
Formal Syntax & Structure
javascript syntaxjavascript
setImmediate(callback, ...args)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| callback | function | Callback to schedule. |
| args | any[] | Arguments forwarded to callback. |
Return Value
Immediate
Node handle usable with clearImmediate.
Working Example
Example Snippetjavascript
setImmediate(()=>console.log("immediate")); console.log("sync");