Example 1 — Example
Typical call.
JavaScript
console.assert(1 === 2, "math broke");
console.assert(true, "silent");How It Works
- Run the snippet.
- Read the printed output.
console.assert(condition, ...) prints only when the condition is falsy.
console.assert(1 === 2, "math broke");
console.assert(true, "silent");Typical call.
console.assert(1 === 2, "math broke");
console.assert(true, "silent");CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
6 people found this page helpful