-
parseInt not working pls help me in mx 2004
Hi everybody,
pls help me i can't understand y parseInt is not working
I'm having 1 array which contains the value from a user input, only numbers. when i supposed to sum all the values using parseInt i won't get result the result is only Nan. pls anybody have the solution for it.
here is the code :
(Note I'm Using Mx 2004 Professional)
[I] input = "25,15,10,30,20";
myArray = input.split(",");
for (i =0; i<myArray.length;i++){
val = (parseInt(myArray));
sum += val;
}
trace(sum)
the output only comes as Nan . pls help me
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|