Skip to content

Instantly share code, notes, and snippets.

@jhartikainen
Last active Dec 13, 2016
Embed
What would you like to do?
JavaScript doesn't have classes lololo
//java
class X extends Y {
public X() {
super();
}
public void method() {
}
public static staticMethod() {
}
}
//javascript
class X extends Y {
contructor() {
super();
}
method() {
}
static staticMethod() {
}
}
//java
X obj = new X();
obj.method();
//javascript
var obj = new X();
obj.method();
//java
X.staticMethod();
//javascript
X.staticMethod();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment