I'm asking this because I just saw it on a piece of code:
var myVar = function func(arg){
console.log(arg);
}
I don't understand why function is "renamed" func just before it was defined for myVar.
Can somebody explain the interest of doing this, and not just:
var myVar = function(arg){
console.log(arg);
}
Thank you very much!
funcisundefined. So, it is not renaming thefunctionfuncwill exist, but what's the interest of writing itfuncis not defined, you cannot even use it. I'm also keen to know what this is