var obj = { prop = [1,2,3] };
The code above contains a typo, there should be a colon instead of =
. But what surprised me was the VM error message:
var obj = { prop = [1,2,3] };
^^^^^^^^^^^^^^
SyntaxError: Invalid shorthand property initializer
I searched for "JavaScript shorthand properties" but this term is still not clear to me. What does "Shorthand property" means in context of this error message?