I am new to JavaScript. Can someone explain why I get an unexpected value when I access a namefunction property person?
var name = function() {
console.log('name');
}
function person() {
console.log('hello person');
}
person.name = "hello";
console.log(person.name);
source
share