Java script is object based while the java is object orientedJava is object-oriented.


Java is object-oriented. It employs classes and inheritance. It provides encapsulation of data.
But the JavaScript is object-based. There are no classes. There is no inheritance. Data within objects is readily accessible.