In the code below, I added a new property to the function obj1. However, when I print the value of obj1.name, it shows nothing, just blank!
Well, if what I am doing is wrong then the JavaScript engine has to complain, but it does not. So what is going on here?
var obj1 = function (){
name:"john";
};
console.log(obj1.name);// prints nothing!