Jump to content

how can I grab third array

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Ryut3k

Ryut3k

    Newbie

  • Members
  • Pip
  • 8 posts
var links = document.getElementsByTagName();


I know its something like [2] where do I add that in?

#2
Eieio

Eieio

    Learning Programmer

  • Members
  • PipPipPip
  • 47 posts
Could you be a bit more specific?

Here is what I think you are looking for... remember that you don't want to ever produce a fence pole error. Not only can it kill your application, but it can create exploits in it as well.

If you were to list the _strings array it would look like this.

_strings[0] // First
_strings[1] // Second
_strings[2] // Third


private _strings[];


public main() {

  // Constructor code goes here

  this._strings[] = new String[3];

}


public String getThirdString() {

  return this._strings[2];  // gets third 

}






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users