I have an array of n elements, assuming n is even. I want a 'top' array with has n/2 elements, and a bottom array with n/2 elements, same order. How can I do this easily without some sort of loop manipulation?
Yeah I ended up having to do a loop of half the size and messing with pop/unshift to get the order right...I was hoping there was some easier way..for example in Python they have something like
B = A[:len(A)/2]

which is a one liner..anyway..problem solved..thanks for your help!