❗arrow function returning object literal needs (...)❗️
🚧 under construction
JS ⟩ objects ⟩ arrow function ⟩ returning object literal needs (...)
the following code:
is interpreted as:
which causes an error:⛔️ SyntaxError: Unexpected token ':', have to wrap the object literal in parentheses to make it work.
Last updated