Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

trace how many arrays between

$
0
0

i have this array:

var spazi:Array = [0,3,0,0,6]

 

i have to trace how many numbers are there after number 6 to reach number 3, only going forward.

 

Examples:

[0,3,0,0,6] after 6 we have 0 , 1 number

 

 

other example:

[0,6,0,0,3]

 

after 6 we have 0 and 0 , 2 numbers before reaching 3.

 

other example:

[0,7,3,6,1]

 

after 6 we have 1 and 0 and 7, 3 numbers before reaching 3.

 

 

how can i write that in the simplest way?


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>