I’m stuck and can’t seem to solve this problem.
In my function, the parameter filter
needs to be a function call that accepts an object created within the same function:
function bindSlider(time, filter)
{
var values = {
min : 8,
max : 9
};
filter(values);
}
Now I'm not sure how to correctly call bindSlider
, I initially thought it would look like this:
bindSlider(time, function(values) {/*do something here with the values from bind slide*/});
However, this results in an error:
ReferenceError: fliter is not defined
I am aware that I could do the following:
function filter(values) {
}
bindSlider(time, filter);
But I want to define filter differently for each call, so I am looking for a pattern like function() {}
.