1. Home
  2. ›
  3. Javascript
  4. ›
  5. 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