Q: how to get only values with odd indexes from list
hi, I'm using For loop, and need to get only value with odd indexes
example:
input: $list: a, b, c, d, e
output: a,c,e
how to get only odd values from list?
Posted Nov 12, 2017, 3:20 PM UTC
41
hi, I'm using For loop, and need to get only value with odd indexes
example:
input: $list: a, b, c, d, e
output: a,c,e
how to get only odd values from list?
Posted Nov 12, 2017, 3:20 PM UTC
Modulus division would probably be your best bet! $index % 2 != 0