How do you define instance and non-instance properties

Posted by Jessica Taylor | Updated on

The Instance properties must be defined inside of class methods. For example, name and age properties defined insider constructor as below:

But Static(class) and prototype data properties must be defined outside of the ClassBody declaration. Let’s assign the age value for Person class as below,

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers