In the following example: http://jsfiddle.net/maniator/ScTAW/4/ I have this js:
var storage = (function () { var store = [];
Your storage adding function is completely evaluated before console.log is called because it's a parameter.
console.log
This is not specific to console.log, this is how every imperative programming language works.