This is not what node.js is for, if you're using node.js then you should follow async programming pattern. Unless you have some strong reason not to.
These links might help you understanding concepts of asynchronous programming model:
http://lostechies.com/johnteague/2012/11/30/node-js-must-know-concepts-asynchrounous/
http://stevehanov.ca/blog/index.php?id=127
Firstly, you should place that console inside the callback if you want it to execute after the request.
Second, you should never place an async code inside a for loop, instead use recursive function like I have shown below.
function fn() {
request(url,function (error, response, html) { //where url is website url
console.log(html);
// here
console.log("some text");
if (condition) {
fn();
} else {
// done
done();
}
});
}
function done() {
console.log('abc');
}
Keeping it in for loop will create a mess with scope because the complete loop will get executed before even the first callback occurs.