try this..
var A = [850, 851, 850];
var output = new Array();
for (var i = 0; i < A.length; i++) {
var current = A[i];
var flag = 0;
for (var j = 0; j < A.length; j++) {
if (current == A[j])
flag++;
}
if (flag == 1)
output.push(current);
}
alert(output);