You only think it’s the same because of the way you formatted your curly braces — on a newline. If you put them on the same line, this would become obvious
let funModule = ( function ()
{ // you are not returning anything here
return
{
isCuteMixin: function (obj)
...
let funModule = ( function ()
{ // but here you are returning an object
return {
isCuteMixin: function (obj)
{
the expression after a return statement has to be on the same line because of automatic semi-colon insertion
The return statement is affected by automatic semicolon insertion (ASI). No line terminator is allowed between the return keyword and the expression. return - JavaScript | MDN
Yeah, forgot to update after reading the link given by @Layer . I figured it out. Can’t say that I like it, but I understand what’s going on.
I’m a relatively noobish developer, but I’ve been battling auto-English constructs since Microsoft Word first decided it was better at grammar than I am. It’s easy to imagine that I’ll hate auto-code just as much. At least with Word I can turn all that junk off.