...

View Full Version : Where is a complete ECMAscript documentation



sampson1952
09-18-2011, 01:13 PM
I have been searching for years to get ahold of a complete reference to the ECMAscript languages.

I was recently watching some old videos by Douglas Crockford. He talked about the 'set' and 'get' statements. I had never heard of them before... and infact was one of the things I really missed from Delphi and have been wishing for in javascript.

Even now I can't find any references that contain them. I keep having this feeling that there is so much more in the language than I know about and there is no easy way to learn it.

Where is the most complete reference of the language?

David

DaveyErwin
09-18-2011, 02:27 PM
go to www.codingforums.com
click on JavaScript programming
in the javascript forum click on
Sticky: JavaScript Documentation & References

sampson1952
09-18-2011, 10:16 PM
I appreciate your suggestion... I had already reviewed those examples though. None of them document the 'set' and 'get' statements. At least as far as I could see.

How do you guys learn what functionality is available. I can't imagine that I am the only one who is struggling with this issue.

I am not talking, necessarily, about just the 'set' and 'get' statements... I was just surprised that this functionality, that I have wanted for a long time, has been available all along.

DaveyErwin
09-18-2011, 10:45 PM
I appreciate your suggestion... I had already reviewed those examples though. None of them document the 'set' and 'get' statements. At least as far as I could see.

How do you guys learn what functionality is available. I can't imagine that I am the only one who is struggling with this issue.

I am not talking, necessarily, about just the 'set' and 'get' statements... I was just surprised that this functionality, that I have wanted for a long time, has been available all along.

Hmmm, well I guess javascript
doesn't have get and set then.
You can impliment them yourself.
not useful but
very simplistic code ....



<script>
function TheConsructor(){
var myProp = "default"

this.set = function(arg){
myProp = arg;
}
this.get = function(arg){
return myProp;
}
}

var a = new TheConsructor();
alert(a.get());
a.set("hello");
alert(a.get());
</script>

Old Pedant
09-18-2011, 11:34 PM
sampson1952: Are you sure you aren't confusing ECMAScript (a.k.a. JavaScript) and Java??

*JAVA* traditionally has set and get. JavaSCRIPT (which is just one company's name for their version of ECMAScript) has very little in common with Java, except the first 4 letters of their names.

JAVA is an OO language. JavaScript can be used for OO programming, but it's not an OO language, per se. Just as a "for instance", JavaScript (ECMAScript) has no private and public keywords. (You *can* accomplish much the same thing, but the concepts aren't part of the language, per se.)

Having said all this... Even in Java, get and set are not "statements". They are patterns. OO programming patterns.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum