let module = { create: function(greeting, name) { /** * Ran into issue with lexical scoping when * using the fat arrow. Wanted to make a note * here. **/ const obj = { sayIt: function () { console.log(this); return `${this.greeting} ${this.name}`; }, }; return Object.assign({}, obj, { name, greeting, }); } }; alex = module.create('hello', 'alex');