A simple function to get the number of contiguous items that surround an index in an array.
By chatting or signing in you agree to the Terms and chat-message logging (revocable in History).