Is there an 'assert' function to detect out of bounds conditions as in 'C'?
No... But you can just add console.assert = function(x){if(!x) throw new Error("Assert Failed")}; and job done
console.assert = function(x){if(!x) throw new Error("Assert Failed")};
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
No... But you can just add
console.assert = function(x){if(!x) throw new Error("Assert Failed")};
and job done