If a callback calls the enclosing function, would it be called a recursive call?
http.request(options, function(res) { res.on('data', function(chunk) { data+=chunk; });
res.on('end', function(){
//do some stuff
http.request(options, function(res) {...});//is this recursive?
});
}).end();Or a simpler case: suppose there is a function which reads a file character by character:
var noOfChar = 10; var i = 0; readChar(function processChar(char){ if(i < noOfChar) { console.log(char); i++; readChar(processChar); //is this recursive? } }