how to get an element from the middle of an array js code example Example: javascript get middle of array var value = arr[arr.length / 2 | 0];