Choose Category
<script type="text/javascript"> //Custom Assert Function function assert(bCondition, sErrorMessage) { if (!bCondition) { alert(sErrorMessage); throw new Error(sErrorMessage); } } // Expression returning FALSE, it throws exception assert(1==2,"It is a error"); // Expression returning TRUE assert(1==1,"It is a not an error"); </script>