Why it is undefined

var foo = { bar: function() { return this.baz; }, baz: 1 }; (function(){ return typeof arguments[0]; })(foo.bar);

here typeof is function

var foo = { bar: function() { return this.baz; }, baz: 1 }; (function(){ return typeof arguments0; })(foo.bar);

then when function is called why type of is undefined

In both cases I am getting value of foo and can’t find what exactly you are trying to say is undefined, can you write a console.log() to show what you are trying to say is undefined

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.