Nitpick: better to name arguments different than function. How about:
```
function ok(cond, msg) {