var arrInput = [1,1,1,8,2,2,2,3,3,6,2,5,5,7,3,4,8,7]; var arrOutput = []; arrOutput[0] = arrInput[0]; console.log(arrInput, " <>arrInput<> ") var o = {}, i, l = arrInput.length, arrOutput = [];for(i=0; iarrOutput<> ")