Click to See Complete Forum and Search --> : Importing data into arrays


Dudsmack
11-12-2003, 02:26 PM
I have a series of data (about three hundred numbers) that I want to import into a series of arrays, aka

boxlineOne(1) =
boxlineOne(2) =
...
boxlineTwo(1) =
boxlineTwo(2) =
....

and so forth. Now back in the good ol' days of basic you could:

DATA 'num1', 'num2'...'numX'
for t = 1 to boxlineOneCount
read boxlineOne(t)
next t

Are there any equivalents in Javascript. Somehow I don't think so...and I don't want to have to go through and assign each one manually (and unfortunately no alogrithm could generate the data), any recommendations?

Charles
11-12-2003, 02:38 PM
<script type="text/javascript">
<!--
data = [1 ,2, 3, 4, 5, 6, 7, 8, 9, 10]; // you can split this into several lines
alert(data[1])
// -->
</script>