You are reading a single comment by @opichals and its replies. Click here to read the full conversation.
  • @MaBe The documentation to setTimeout states:

    Returns An ID that can be passed to

    To answer your question calling a function without an argument is identical to calling it with undefined

  • @AntiCat Thanks, exactly.

    @SergeP @Gordon I don't think this is a bug but rather a feature that the Espruino cleanInterval() implementation deviates from the specified behaviour by cancelling all scheduled timeouts and intervals rather then doing nothing.

    That said unless we would like to change the behavior to comply to the spec which would break a lot of existing user code done specifically for Espruino (perhaps doable using some sort of deprecation mechanism).


Avatar for opichals @opichals started