Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post

    Where is a complete ECMAscript documentation

    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
    Last edited by sampson1952; 09-18-2011 at 01:20 PM.

  • #2
    Regular Coder
    Join Date
    Aug 2010
    Posts
    974
    Thanks
    19
    Thanked 212 Times in 210 Posts
    go to www.codingforums.com
    click on JavaScript programming
    in the javascript forum click on
    Sticky: JavaScript Documentation & References

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.

  • #4
    Regular Coder
    Join Date
    Aug 2010
    Posts
    974
    Thanks
    19
    Thanked 212 Times in 210 Posts
    Quote Originally Posted by sampson1952 View Post
    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 ....


    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>
    Last edited by DaveyErwin; 09-18-2011 at 10:50 PM.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,650
    Thanks
    80
    Thanked 4,636 Times in 4,598 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •