Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

My first Javascript object...

$
0
0

I am attempting to create a Javascript object.  So far it looks like this:

 

function URLObject()

{

   this.firstName = false;

   this.troubled = false;

   this.syllables = new Array();

   this.folders = new Array();

   ...

 

   this.AddToURL = AddToURL;

   function AddToURL(TheWord)

   {

       var SylCount = this.syllables.length;  //At this point SylCount is reported as being undefined.

       this.syllables[SylCount] = TheWord;   //  So of course, this does not work either.

       

   }

}

 

...

var URLAddress = new URLObject();

 

 

I expected building objects to be advanced, but straightforward.  I have researched the pubs and there is noting in them that suggests I cannot create arrays within objects. So why can't I get a length from my syllables array in my URLAddress object?


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>