This code is giving me a SCRIPT5002: Function expected
error:
var callIt = function(func) { func(); }
WHY!? It's like it's trying to do type checking or something
EDIT: use case
var callIt = function(func) { func(); }
function nextSlide() {
var fn = currSlide ? currSlide.hide : callIt;
currSlide = setupSlides[++slideIdx];
fn(currSlide.show());
}
DOH!