I am learning JavaScript and read that functions are like objects and can have properties set like this:
var person = function(){
}
person.name=\"John Smith\
The name property is set by the Function constructor and cannot be overwritten directly. If the function is declared anonymous, it will be set to an empty string.
For example:
var test = function test() {};
alert(test.name); // Displays "test"
test.name = "test2";
alert(test.name); // Still displays "test"