function removeDuplicates(num) { var x, len=num.length, out=[], obj={}; for (x=0; x