Skip to content

Change in return value of setTimeout #35770

Description

@kefasb
  • 12.19.0:
  • all:

What steps will reproduce the bug?

In node:12.19.0-slim docker image setTimeout function returns a value for which isNaN=false
In node:12.18.4-slim docker image setTimeout function returns a value for which isNaN=true

timeoutId = setTimeout(function() {alert("Timeout")}, 1000);
console.log(isNaN(timeoutId))

image

Is this an intentional behaviour?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions