console.assert(value[,
...message])
If
the value is evaluated to false, then the message is logged. If the value is evaluated
to true, nothing will happen.
/* This message is not logged */ console.assert((10 == 10), "%d is equal to %d", 10, 10); /* This message is logged */ console.assert((10 == 11), "%d is not equal to %d", 10, 11);
Output
Assertion
failed: 10 is not equal to 11
No comments:
Post a Comment