1. Home
  2. Javascript
  3. Console assert

Console assert takes two attributes. If the first attribute is evaluated as false it will log a message passed as the second attribute.

#javascript#console
console.assert(false, "Message to log.");
copy
Full Javascript cheatsheet