Use the Console API to write messages to the Console from your JavaScript. See Get started with logging messages to the Console for an interactive introduction to the topic.
See Console utilities API reference if you're looking for the convenience methods like debug(function) or
monitorEvents(node) which are only available from the Console.
console.assert(expression, object)
Log level: Error
Writes an error to the console when expression evaluates to false.
const x = 5;
const y = 3;
const reason = 'x is expected to be less than y';
console.assert(x < y, {x, y, reason});