Whereas Java and several other programming languages have a wide and rich range of datatypes and collections types, JavaScript only has a small number of primitive datatypes (Boolean, Number, String, ...
Java and JavaScript are two very different programming languages, albeit with similar names. Java is generally associated with enterprise application development and the Android mobile platform.