javascript - why eval can not acess arguments if assigned to local variable -


it seems strange me if assign eval variable , call inside function can't access arguments object.

(function() {   ev = eval;    console.log(eval('arguments')); // it's fine   try {     console.log(ev('arguments')); // error here!   } catch (e) {     console.error('ev: ' + e.message);   }       })(1) 

interactive example: jsbin

what causes behavior? can reference in spec?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -