Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Mind to explain why that is needed? Commented Dec 18, 2017 at 10:00
  • this is called property initializers and they are part of ES7 standard. to enable them in ES5/ES6 environments, you need to use a transpiler with proper settings. you can read more here Commented Dec 18, 2017 at 10:05
  • @Mox I'm editing right now, sorry but I usually prefer to give a brief answer and then provide more details in the next hour or two. Commented Dec 18, 2017 at 10:30
  • Also, you'll find further infos in the link embedded into my answer Commented Dec 18, 2017 at 10:35