Skip to content

warning

Display a warning message.

warning(errMsg)
warning(msgId, errMsg)
warning(msgId, errMsg, v1, v2, ...)

Prints a warning to the console without halting execution. Same argument conventions as error. Use to flag unusual but non-fatal conditions.

warning('Result may be inaccurate for n > 100')
  • error — Throw an error.
  • assert — Assert that a condition is true; throw an error if not.