I am trying to pass a `callback` function inside a `self-invoking function` in JavaScript but I get 'undefined' when `done` function is executed.

I read [this answer](https://stackoverflow.com/questions/24103264/parent-function-variable-access-from-callback-and-inline-self-invoking-function) to write this code below:

```
function done() {
    console.log(dateFilter.getI());
    console.log(dateFilter.getF());
}

var dateFilter = (function(callback) {
    var _dInicio = new Date(), _d = new Date(),
        _dFim = new Date(_d.setMonth(new Date().getMonth() - 1));
    return {
        getI: function() { return _dInicio; },
        getF: function() { return _dFim; },
        setI: function(d) { _dInicio = d; },
        setF: function(d) { _dFim = d; }
    }, callback();

 })(done);

```

Maybe I am using the [comma operator](http://es5.github.io/#x11.14) wrong, but I think this should work. Someone could point me where i am misunderstanding something?