166
rated 0 times
[
167]
[
1]
/ answers: 1 / hits: 48279
/ 9 Years ago, sat, april 11, 2015, 12:00:00
Is it possible to see the callee/caller of a function when use strict
is enabled?
'use strict';
function jamie (){
console.info(arguments.callee.caller.name);
//this will output the below error
//uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
};
function jiminyCricket (){
jamie();
}
jiminyCricket ();
More From » use-strict