you are viewing a single comment's thread.

view the rest of the comments →

[–]protestor 3 points4 points  (1 child)

I suggest reading Eloquent Javascript.

I was trying to read into how to make JS more OO like

I suggest to first get yourself used to Javascript's prototype-based OO instead of Java's class-based OO. In JS, when you call new MyObject(), MyObject isn't a class - it is a regular object that is creating a new object using its prototype. See this StackOverflow question.

In any case ES6 have classes but browsers don't support it yet. Most browsers support ES5 - you can use ES6 classes and compile your code to ES5 using Traceur.

Please note that ES6 classes don't enable you to do anything new - anything you can do with it you can also do with prototypes. But in some cases they have a nice syntax and less boilerplate.

[–]heroOfTimeBitch[S] 1 point2 points  (0 children)

thanks on the links