Read full article on the Infragistics blog In modern JavaScript, objects are integral, and having a strong understanding of topics surrounding objects is necessary for writing better JavaScript. You can create an object in four ways in JavaScript. Read about them in greater detail here. Once you know how to create an object, you may wish to learn about object property descriptors. As a recap, let us say you have an object –cat: Each object property contains more information than just a value. For example, you can print other property information using the Object.getOwnPropertyDescriptor method On the console, you can see that a property name offers further information: As is very clear, if writable is set to true, you can rewrite a property value, etc. You can read more about the JavaScript Object Property Descriptor here. As of now, you know about object property descriptors, so if you are required to make a property Read-Only, you will set the property writable to false. Next, let us go through a few more requirements for changing the default behavior of a JavaScript object.
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
JavaScript,Javascript,Objects
Stay tuned to my blog, twitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to
JavaScript,Javascript,Objects
0 Comments