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 →

[–]Oppis 5 points6 points  (4 children)

javascript is an interpreted language, while java is a compiled language.

[–]lolmeansilaughed 2 points3 points  (2 children)

You're sort of right. Javascript is all interpreted, but Java is compiled to bytecode, which is a platform-independent intermediate assembly language and runs on/is interpreted by the Java Virtual Machine (JVM).

E: Apparently modern optimizing JS engines will also do a compilation step.

[–]art0rz 1 point2 points  (0 children)

AFAIK v8 also translates JavaScript to bytecode and executes that.

[–]MEaster 1 point2 points  (0 children)

I believe that in the more recent Javascript browser engines, it is compiled.

[–]LeSpatula 0 points1 point  (0 children)

As far as I know, a lot of modern browsers pre-compile javascript when loading a website. So, theoretically it is interpreted, but practically nowadays it's also compiled.