Why the typeof f is not function here?

Why the typeof f is not function here?

Share the code where you are facing this error