Method definition is a shorter syntax for defining a function property in an object initializer. It can also be used in classes....function* () { let index = 0; while (true) { yield index++; } }, }; //...*g() { let index = 0; while (true) { yield index++; } }, }; const...