Sunday, November 18, 2018

JavaScript compared to Java

Object-oriented. No distinction between types of objects. Inheritance is through the prototype mechanism, and properties and methods can be added to any object dynamically.Class-based. Objects are divided into classes and instances with all inheritance through the class hierarchy. Classes and instances cannot have properties or methods added dynamically.
Variable data types are not declared (dynamic typing, loosely typed).Variable data types must be declared (static typing, strongly typed).
Cannot automatically write to hard disk.Can automatically write to hard disk.