Tuesday 29 January 2013

JavaScript - Predict the Output - Question 1

"use strict";
function strict() {
  "use strict"; // top of the function
  return {
    withStrict: function(){
      return this; // undefined
    }(),
    withoutStrict: Function("return this")()
  };
}
var really = strict();
really.withStrict; 
You must specify the reason too.