The problem is the horror that automatically inserts a semicolon . JavaScript rules for ASI are inserted ;after return, giving you the following:
return;
"some text";
, — return , undefined, , ( , ).
, , ( ), , , ASI , , parens:
return (
"some text"
);
( , , .)
, , ASI, . , return, , . :
return
{
result: "success"
};
, ASI, .
: - , , return. , ASI .
Axel Rauschmayer ASI / ( ). :
a
++
c
... ASI
a;
++
c
... .: -)