I can't quite seem to figure this out.
I have a function where a parameter filter needs to be a function call that accepts an object built within this function:
function bindSlider(time, filter)
{
var values = {
min : 8,
max : 9
};
filter(values);
}
I'm now unsure how to call bindSlider, I thought it'd be something like:
bindSlider(time, function(values) {/*do stuff here and accept values built in bind slider*/});
but this fails with the error:
ReferenceError: fliter is not defined
I know I could do:
function filter(values) {
}
bindSlider(time, filter);
but I want to declare filter differently for each call so a function() {} type pattern is what I'm after.
var aa=filter(values);don't call method without reference