Why does
var spo = function(){
var qq = function(){};
}
throw the error undefined is not a function when
var spo = function(){
function qq(){};
}
does not?
More elaborate example throws the exact error: TypeError: undefined is not a function
node version v0.6.10 compiled on Ubuntu
spo = function(car){
var q = 10;
var s = 'fraggle';
var qq = function(){
console.log(s);
}
(function(){
while(q){
console.log(q);
q--;
}
qq.call();
car.call();
})();
};
spo(function(){console.log('as intended');});