Can someone explain me what are the differences between those two functions below?
I'm wondering if JavaScript engines do some kind of nano-optimizations here.
function withoutVar() {
return 'stackoverflow';
}
function withVar() {
var result = 'stackoverflow';
return result;
}
var a = withoutVar();
var b = withVar();