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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -