How do I create an array in JavaScript and then go through it?
I want to feed a function with the string "foo,bar,rab,oo f" and want JavaScript
to do something with each line, like this (in pseudo-code):
myfunc("foo,bar ,rab,oof");
function myfunc(string){
foreach i (split(",", string)){
alert(i);
}
}
Or something like that.
--
Sandman[.net]
I want to feed a function with the string "foo,bar,rab,oo f" and want JavaScript
to do something with each line, like this (in pseudo-code):
myfunc("foo,bar ,rab,oof");
function myfunc(string){
foreach i (split(",", string)){
alert(i);
}
}
Or something like that.
--
Sandman[.net]
Comment