Java uses its own native code then executes it on a virtual machine i.e. JVM (Java Virtual Machine). The Java compiler converts the code into byte code. These Byte codes are machine code instruction for JVM.
Java Script is the object oriented scripting language which is developed by Netscape. Java Script code is embedded in HTML and runs directly on the browser. Java Script code is not compiled they are directly run on the browser. It is used for providing interactivity to the simple HTML pages. Java script code runs on the java script enabled browsers. The java script code is interpreted by the java script engine.