javascript - why eval can not acess arguments if assigned to local variable -
this question has answer here:
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
Post a Comment