I am using Google Chrome version 52 64-bit. I found out that if I use anonymous function expression ex.
// Anonymous function expression
var expressionFunc = function(){
return true;
};
The variable expressionFunc
will hold the assigned anonymous function,
But it is also adding a name property expressionFunc
to this function.
So if I do expressionFunc.name
in the console,
It will give me expressionFunc
.
From what I know this anonymous function expression should stay anonymous, And the function referenced by the variable should not contain the variable name in the name property of the function.
Why is chrome assigning name property to an anonymous function?