Repaso
EspaƱol
Frontend & WebFoundationsFE-56

JavaScript and Java: how are they related?

Options

  1. JavaScript is a lighter, simplified version of Java
  2. Different languages; the similar name is historical (Correct option)
  3. They are the same language with two different names
  4. JavaScript can only run inside of Java programs

Answer

They are two different programming languages with different purposes; the similar name is historical and causes confusion

Why

Despite the name, they are not related.

JavaScript was created to add behavior to web pages in the browser. Today it also runs on servers (with Node.js).

Java is a general-purpose language that is very common in backend and enterprise systems.

In an interview, mixing them up is a red flag, so keep them separate in your head: Java is not JavaScript.

Remember

Java and JavaScript are different languages.

Key terms

Practice this question in Repaso