Below are some of the things you can do to minimise this in Jsi.
To reduce coding errors and enable maximal checking, use strict mode by starting with:
"use strict"; //...
#!/usr/bin/env jsish "use strict"; //...
Expression checking should be as simple as possible, eg:
if (x) ...
is often preferred to:
if (x != '') ... if (x != 0) ...
because it handles the case where x may be undefined.
Jsi will check for undefined vars used on the left-hand side (LHS) of conditional expressions. To such avoid errors, put the var on the RHS.
"use strict"; var x; if ('' === x) puts('x empty'); //OK. if (x === '') puts('x empty'); /tmp/us.jsi:4: error: lhs value undefined in ===/!== ERROR