Last active
December 13, 2016 01:36
-
-
Save jhartikainen/3b01e9c486213308e4e4f8b4013db6d0 to your computer and use it in GitHub Desktop.
JavaScript doesn't have classes lololo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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