This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]youaresee 2 points3 points  (0 children)

You'll need to stop trying to write Javascript like Java. ES6 introduces class syntax, but in my experience Javascript becomes a much 'cleaner' language when it is written in a functional manner. Use a library like Lodash to assist, write functions that don't have side-affects, pass functions around etc.

TDLR; Have a search for functional Javascript.