Please consider the following two code snippets:
(function f() { var x; try { eval("x"); console.log('No error!'); } catch (e) { console.log('Error!'); } }(eval))
and
(function f(eval) { var x; try { eval("x"); console.log('No error!'); } catch (e) { console.log('Error!'); } }(eval))
First print No error! , the second is Error! . Is there a way to access the "local eval " inside the function area for which eval is one of the arguments?
source share