function myFunc(){ console.log(myFunc.message); } myFunc.message = \"Hi John\"; myFunc();
Executing the above results in -
Answer:
How does the above work? Is function in javascript internally an object?
Yes
function example() {}; console.log(example instanceof Object);