Inner functions and outer 'this' (Re: That hash symbol)

Biju bijumaillist at gmail.com
Sun Mar 27 21:37:12 PDT 2011


Here, cant we use "^" instead of "#", I dont think it will conflict
with existing "bit xor" operator.
Like:-

function Outer() {
  var x = "outer";
  function Inner() {
      var x = "inner";

      log(x); // "inner"
      log(^x); // "outer"
      log(^^x); // global scope, probably unbound
      var save_outer_x = ^x;
      ^^x =  "new global value" ;
  }
}


More information about the es-discuss mailing list