this code will return true if item does exist in array but it should be true when item was duplicated [duplicate]

const arr = [12, 12, 10, 11];
function repeatedItem(i) {
  if (arr.indexOf(i) !== -1) return true;
  else return false
}
console.log(repeatedItem(10));

this code will return true if item does exist in array but it should be true when item was duplicated

what should do to return true if item was duplicated