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!
 
    