function compactArray(arr) {
    var len = arr.length

    for (var i = 0; i < len; i++) {
      if (arr[i]) {
        arr.push(arr[i])
      } // Endif.
    } // End of for loop.

    arr.splice(0, len) // Cut the array and leave only the non-empty values.
  }
Compact the given array.

This function compacting the given array.

@param {object} arr The array to compact.