Skip to content

Why does the function setTimeout() return the different value between nodejs and chrome console? #1903

@bahuwang

Description

@bahuwang
  • Node.js Version: 10.15.3
  • OS: windows 10 1809
  • Scope (install, code, runtime, meta, other?): code
  • Module (and version) (if relevant): Timers
    var a = setTimeout(function () {
        console.log('time')
    },1000 )
    console.log(a)

I want to know why the return value of nodejs is Timeout and chrome console is a timeoutID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions