window.onload = function(){
var array = [12, 14,15,17,12,11,12,14,16]
alert(del(array));
}
function del(arr){
var str = [];
for(var i = 0,len = arr.length;i < len;i++){
! RegExp(arr[i],"g").test(str.join(",")) && (str.push(arr[i]));
}
return str;
}