Getters & Setters

Getters & Setters

I have been trying to track down an answer on this for a couple days now. Maybe you can help me out. Can Javascript object properties have getters and setters?

The Reddest
05/21/2009 - 09:25

The current Javascript, based on ECMAScript 4, doesn't have built in support for getters/setters. The next version does. Here's a link that describes it a little.

reply

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.