Ok. Well here is an example of JavaScript Arrays. Click on the link below to see it in action. Just be ready to type 5 quotes in! Don't get mad though! :)
Well....pretty cool huh? How they do it? right? HEHE, pretty easy actually. Similary to PERL, but just a tad different.
|
The Source: |
|
<SCRIPT
language="JavaScript"> var
x=0; |
|
|
Explanation:
To assign an array in JavaScript, you need to first know the syntax:
var your_array_name = new Array(number of items you want in it)
Ok, that was easy enough. Then if you want to set loops like I did, decide on any variable and set it equal to zero. Then do what you want with the loop. I just set it to have alert boxes for every the number of quotes, in this case 5. Pretty easy to do isn't it? That's it.
Try it out here if you don't want to go back to the top.