Tweaking console.assert in IE9

Today while writing some JavaScript I was using the console.assert method to work out the state of things at different points in time.
If you’re not familiar with console.assert here’s the method signature:
console.assert(expression, messag…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

Today while writing some JavaScript I was using the console.assert method to work out the state of things at different points in time. If you’re not familiar with console.assert here’s the method signature: console.assert(expression, message[, object]) What this allows you to do is pass in an expression to be evaluated, a message to display when the expression is false and an optional object to dump. This is really useful if you’re writing large chunks of JavaScript and you can’t/ don’t want to attach the debugger (common if you’re working with timeouts and intervals), you can have the application assertion results to the console to be observed.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2023-03-26T06:12:05+00:00) » Tweaking console.assert in IE9. Retrieved from https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/.
MLA
" » Tweaking console.assert in IE9." Posts on LINQ to Fail | Sciencx - Sunday January 30, 2011, https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/
HARVARD
Posts on LINQ to Fail | Sciencx Sunday January 30, 2011 » Tweaking console.assert in IE9., viewed 2023-03-26T06:12:05+00:00,<https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Tweaking console.assert in IE9. [Internet]. [Accessed 2023-03-26T06:12:05+00:00]. Available from: https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/
CHICAGO
" » Tweaking console.assert in IE9." Posts on LINQ to Fail | Sciencx - Accessed 2023-03-26T06:12:05+00:00. https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/
IEEE
" » Tweaking console.assert in IE9." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/. [Accessed: 2023-03-26T06:12:05+00:00]
rf:citation
» Tweaking console.assert in IE9 | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2011/01/30/tweaking-console-assert-in-ie9/ | 2023-03-26T06:12:05+00:00
https://github.com/addpipe/simple-recorderjs-demo