this is strange!!?!?
WHY does the star[0,0] value change on every loop?!?!
<script>
star = new Array()
for(n=0; n<=3; n++){
star[n,0] = Math.round(Math.random() * 100)
alert(star[0, 0])
}
</script>
Printable View
this is strange!!?!?
WHY does the star[0,0] value change on every loop?!?!
<script>
star = new Array()
for(n=0; n<=3; n++){
star[n,0] = Math.round(Math.random() * 100)
alert(star[0, 0])
}
</script>
You are calling on and assigning values in a multideminsional array. But you have only instantiated a single deminsional array.