so I have an array and I want to add 1 to all the items.
var arr = [2, 3, 6, 9]
for (index, x) in enumerate(arr) {
arr[index] = arr[index] + 1
}
is there a simpler version of this? there's no reason to have 'x' in there. I know there's the alternate way of writing it this way:
arr[index] = x + 1
but that doesn't seem like enough reason to have 'x' there.