Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

something parse wrong. #14

Open
Gaubee opened this issue Jul 25, 2013 · 1 comment
Open

something parse wrong. #14

Gaubee opened this issue Jul 25, 2013 · 1 comment

Comments

@Gaubee
Copy link

Gaubee commented Jul 25, 2013

function fn(){};
(function fn(){});

all of those are parse as

  Function(
      "fn",
      [],
      []
  )

but

(function fn(){  /* fn is *Effective* in this Scope */  }());
console.log(typeof fn);// undefined  -->  but lost effective when out of "(   )";
@WJsjtu
Copy link

WJsjtu commented Jan 13, 2015

It doesn't work with js well.

var a = function(){
   var temp = 2;
   return function(init){
      return init + temp;
   }
};
console.log(a()(4));

It cannot point out what init is correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants