method Console.assertprivateConsole.assert(condition?: boolean,...data: any[],): voidDeprecatedTests that an expression is true. If not, logs an error message ExamplesExample 1 console.assert(1 === 1, "This won't show"); console.assert(1 === 2, "This will show an error"); Parametersoptionalcondition: booleanThe expression to test for truthiness <span>...data</span>: any[]Return Typevoid