I want to get the name of an anonymous function.
The typical answer is
var aName = function a(){};
Which gives this
aName.name === "a" // true
But I found that this works too:
var a = function a(){};
Which gives this
a.name === "a" // true
typeof a === "function" // true
However, I feel like I'm asking for trouble there, as I'm overwriting names. Are there any repercussions for using such a syntax?