Myth
JavaScript and Java are thought to be same language or that JavaScript is believed to be some kind of lighter version of Java.
Reality
Java and JavaScript are two distinct programming languages, many people tend to be confused when using both terms due to the similarity in the names.
JavaScript is used in the creation of dynamic web pages. It is client side language and is limited to run on a client browser.
Java is a high level object oriented programming language used for software development or server side applications.
The main difference between these two languages, is that JavaScript must be used within the web browser (it is embedded within the HTML code) and that Java applets are stand alone functions that can work outside your web browser.