I am trying to figure out how to get a window of positions based off of a center point in JavaScript.
Say I have the following array: [0,1,2,3,4,5,6,7,8,9]
If