var model = function(arr){ var hasTable = {}; var data = []; for(let i=0;i<arr.length;i++){ if(!hasTable[arr[i]]){ hasTable[arr[i]] = true; data.push(arr[i]) } } return data;};console.log(model([1, 56, 98, 9, 596, 9, 9, 9, 7]));