The console.assert()
writes a message to the console and Log.txt if an assertion is false.
assertion, message
assertion
is a boolean value or expression.message
is a string, printed only if the assertion is false.None (undefined
).
> 1/2 == 0 5, "Hmmm..."
undefined
> 1 == 3, "I guess I can't do math!"
undefined
I guess I can't do math!
console.assert
. Only a subset of standard functionality is currently implemented.