I'm struggling to create a unique array using this function.
---Here is the Function I'm Working With---
var Array = [2, 0, 1, 9, 1, 3, 2, 4, 5, 5, 3, 4]
function uniqueArrayValues(val){
var newArray=[];
for(var i=0 ; i < val.length; i++){
if (newArray.indexOf(val[i]) === -1){
newArray.push(val[i])
}
}
return newArray
}