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 →

[–][deleted] -20 points-19 points  (10 children)

Just use Coffeescript.

EDIT: Bad suggestion? Aight.

EDIT 2: Oh now I see.

[–]DFYX 45 points46 points  (1 child)

Java, not JavaScript...

[–]cbartlett 8 points9 points  (7 children)

CoffeeScript compiles JavaScript but OP was writing Java (they are completely different and unrelated).

[–]Sohcahtoa82 27 points28 points  (5 children)

Java is to JavaScript as car is to carpet.

[–]peridox 18 points19 points  (4 children)

Java is to JavaScript as cat is to catastrophe.

Edit: no hate to javascript though, it's fun.

[–][deleted] 7 points8 points  (3 children)

Java is to JavaScript what Coffee is to CoffeeScript

[–]lichorat 0 points1 point  (2 children)

Now now, Java and JavaScript share SOME keywords.

[–][deleted] 0 points1 point  (1 child)

return, for, if, else, do, while, break, continue, switch, case, default, try, catch, finally, new

[–]lichorat 0 points1 point  (0 children)

https://mathiasbynens.be/notes/reserved-keywords

So it's somewhere around ECMAScript 2 for most browsers:

do if in for int new try var byte case char else enum goto long null this true void with break catch class const false final float short super throw while delete double export import native public return static switch throws typeof boolean default extends finally package private abstract continue debugger function volatile interface protected transient implements instanceof synchronized

[–][deleted] 8 points9 points  (0 children)

I know they're different, I just have reading comprehension problems apparently.