js-runtime/example.html

16 lines
258 B
HTML
Raw Normal View History

2023-09-09 12:22:26 +01:00
<script src="runtime-checker.js"></script>
<script>
function sum(a_number, b_number) {
return a + b;
}
// I need to get rid of this
sum = sum.addRuntimeChecker();
var result = sum(1, 2);
console.log(result); // 3
sum("1", 2); // Error
</script>