Added various todo.jsm features

how do i javascript.  
Some things may not be coded well, but I guess I haven't seen `calc.jsm` yet.
Surely we could do something like this instead:
```javascript
var filteredlist = list.map(function (s, i) {
   return {
        elem: s,
        index: i
    };
});
```