1. Mozilla Developer Network (MDN) Web Docs: The documentation for Map.prototype.entries() explicitly shows it as a method that must be called. It states, "The entries() method returns a new map iterator object that contains the [key, value] pairs for each element in the Map object in insertion order."
Source: MDN Web Docs, Map.prototype.entries(), "Syntax" section. (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/GlobalObjects/Map/entries)
2. Mozilla Developer Network (MDN) Web Docs: The documentation for the for...of statement specifies that it operates on iterable objects. A function object is not iterable by default. It notes, "The for...of statement executes a loop that operates on a sequence of values sourced from an iterable object." A TypeError is thrown if the right-hand side of the of is not iterable.
Source: MDN Web Docs, for...of, "Iterating over a Map" and "Description" sections. (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of)
3. ECMAScript® 2024 Language Specification (ECMA-262): The official JavaScript standard defines the iteration protocol. The for...of statement relies on the object having a @@iterator method (accessible via Symbol.iterator). A standard function object does not have this method, hence it is not iterable.
Source: ECMA-262, 14th edition, June 2023, Section 14.7.5.4 "ForIn/OfBodyEvaluation". (tc39.es/ecma262/#sec-forin-of-body-evaluation)