code: function(arr, value) {
          var inx = arr.indexOf(value);
          var endIndex = arr.length - 1;
          if (inx !== endIndex) {
              var temp = arr[endIndex];
              arr[endIndex] = arr[inx];
              arr[inx] = temp;
          }
          arr.pop();
      }
docs: A more efficient element removal from an array in cases where the array is large