In Java, once an object is created, there is (almost) no way to modify its methods during runtime. Java is not a dynamic language. In JavaScript, things are quite different. You can create an object and modify it easily during runtime, such as adding new properties and replacing a method. That's what a dynamic language can do. Actually, that is not the special part. The special part is that Object is a language type in JavaScript, like other language types that JavaScript has, which includes Undefined, Null, Boolean, String, Symbol, and Number. Any value in JavaScript is a value of those types.
Objects, properties, and property attributes
The undefined type has a single value, undefined. The null type has a single value, null. A Boolean ...
Get Building Applications with Spring 5 and Vue.js 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.