function unique(array) {
  const results = [];

  for (let idx = 0, len = array.length; idx < len; idx++) {
    if (!contains(results, array[idx])) {
      results.push(array[idx]);
    }
  }

  return results;
}
function unique(array) {
  const results = [];

  for (let idx = 0, len = array.length; idx < len; idx++) {
    if (!contains(results, array[idx])) {
      results.push(array[idx]);
    }
  }

  return results;
}
function unique ( array ) { const results = [ ] ; for ( let idx = 0 , len = array . length ; idx < len ; idx ++ ) { if ( ! contains ( results , array [ idx ] ) ) { results . push ( array [ idx ] ) ; } } return results ; }
produces a duplicate-free version of the array

@param {Array} array
produces a duplicate - free version of the array
Returns an array of unique elements