In the book: "Secrets of the JavaScript Ninja" the author demonstrates this code:
<script type="text/javascript">
var outerValue = 'ninja'
function outerFunction() {
assert(outerValue, "I can see the ninja");
}
outerFunction();
</script>
The output is : I can see the ninja
.
What is assert for? Why not just use console.log?