Question: In the following code, I want pass a reference to the print\_season function with parameter "winter" into the function inner\_function. 

```
tony = {
    print_season: function (season) {
        console.log(">>season is" + season);
    },

    report: function () {
        console.log(">>report");
        this.inner_object.inner_function(this.print_season("winter"));
    }, 

    inner_object: {
        inner_function: function(callback) {
            console.log(">>inner_function=" + callback());
        }
    }
}

tony.report();

```

However, when I do the function is invoked rather than passed and I end up with:

```
TypeError: callback is not a function
    console.log(">>inner_function=" + callback());

```

How do I pass the function with specific parameters in this case but to ensure it is not invoked?

Thanks.

Answer: 
You are not passing a function.

You are actually just passing `undefined`

---

You *might* want `print_season` to return a callback function:

```
...

print_season: function (season) {
    // return a callback function
    return function() {
        console.log(">>season is" + season);
    };
},

...

```
Try this:

```
tony = {
print_season: function (season) {
    console.log(">>season is" + season);
},

report: function () {
    console.log(">>report");
    this.inner_object.inner_function(function(){this.print_season("winter")});
}, 

inner_object: {
    inner_function: function(callback) {
        console.log(">>inner_function=" + callback());
    }
}
}
tony.report();

```

Or this:

```
tony = {
print_season: function (season) {
 return function(){
     console.log(">>season is" + season);
 }
},

report: function () {
    console.log(">>report");
    this.inner_object.inner_function(this.print_season("winter"));
}, 

inner_object: {
    inner_function: function(callback) {
        console.log(">>inner_function=" + callback());
    }
}
}
tony.report();

```

The goal is to have a function (callback) not something else.