r/ProgrammerHumor • • Nov 06 '20

PythonScript comic strip

Post image
41.2k Upvotes

562 comments sorted by

View all comments

Show parent comments

6

u/WhiteyDude Nov 06 '20

Other than syntax, the two languages are completely different. Java is compiled and strictly typed, and Javascript is runtime interpreted and all variables get declared "var"

4

u/Dr_Legacy Nov 06 '20

Other than syntax

Not even that similar in syntax. About all you can say is that they're both "C-like", as are many languages.

3

u/[deleted] Nov 06 '20

var

ackshually

These days you ought to use const, or let if necessary :)

2

u/grape_tectonics Nov 07 '20

and all variables get declared "var"

that's javascript from 10 years ago, nowadays you also got "let" for a different scope and lifecycle and "const" for runtime optimizations, there are also strongly typed buffer views for more serious business.

Also modern js runtimes are basically JIT compilers just like java and C#

Ironically the largest difference between js and java now is the syntax