Why SyntaxError: Invalid shorthand property initializer

It’s that modern ES6 syntax that I think is the shorthand that is being complained about by the website’s interpreter.

I recommend trying to resolve matters by putting the property keys in quotes:

  let person = {
    "name": name,
    "material": material,
    "assemble": assemble,
    "duration": duration
  };

And if issues continue, please let us know of the page where this is happening so that a deeper investigation can take place.

1 Like