Say I have an array, [1,2,3,4] and want to use parallel assignment to assign a to 1 and b to 3. I figured I could do something like:
a, _, b, _ = [1,2,3,4]
or even omit the last _ and it will work but Ruby will produce warnings for this for unused variables. Is there some other way to do this? Is this way of using underscores recommended?