Hey guys I'm kind of new to JS and found out that functions are also objects. This means I can add properties to them like this:
let func = function(){};
func.foo = "foo";
console.log(func.foo); // prints foo
However when we now do this:
console.log(func);
It will return (using chrome):
Why does it not show the properties of the object like it usually shows on other type of objects? Also when we for instance try to console.log(Function) it will return the following output:
What is this native code? What I got from other sources was that it is code written in another programming language(C, C++) that programmed the functionality of this constructor.
Thanks in advance!