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.

4
  • This doesn’t look like ES6. TypeScript? Also, no. You could put properties on the array itself, but that’s bad form.
    – Ry-
    Commented Jun 5, 2018 at 1:26
  • Avoid using arrow functions in classes. They lack scope. If you define a method in a class using an arrow function, it'll have no way to reference this. Unless of course the function does not reference the instance in any way, but at that point, why not just turn it into a stand alone function?
    – Eddie D
    Commented Jun 5, 2018 at 1:28
  • And it is ES6. Type script requires explicit data type declarations.
    – Eddie D
    Commented Jun 5, 2018 at 1:29
  • @EddieDelRio, good point. Was just being lazy with a mock up.
    – xon52
    Commented Jun 5, 2018 at 1:31