function unique (array) {
  var a = [];
  var l = array.length;
  for (var i=0; i<l; i++) {
    for (var j=i+1; j<l; j++) {
      // If array[i] is found later in the array
      if (array[i] === array[j])
        j = ++i;
    }
    a.push(array[i]);
  }
  return a;
}
Create an array containing the unique members of an array.

var array = ['a', 'b', 1, 2, 'a', 3 ];

unique(array);
// => ['b', 1, 2, 'a', 3 ]

@param {Array} array
@return {Array}