The getJSON is executed asyncronous and the last console.log is there for executed before the assignment
Since I don't know what you actually want is hard to tell you what you should do. What you need to keep in mind is the execution order.
In this code
$.getJSON(searchURL, function(tweets){
console.log("done");
});
console.log("Request send");
the first thing that happens is a request being send to searchURL
then next thing is that "Request send" will be printed to the console and when the browser receives the response to the request then and no sooner will the function be called and "done" will be printed to the console
further your code has a problem with closure since k is closed over and will have the same value for all invocations of the call back (1)
to get around that problem you could use a self executing function
for(var k = 0;k<10;k++){
$.getJSON(searchURL, (function(i){
return function(tweets){
console.log("done for " + i);
}
}(k));
console.log("Request send for " + k);
}
notice that k is used as an argument for a function immediatedly, the value of the argument is stored for reference by the function return as the callback and will not change when k is incremented. If you do as you have done then since all callbacks are referencing the same object they will all also have the same value for k
(1) unless some returns before the looping ends