Searching Algorithms (linear search, binary search)

What variation of binary search is implemented in this code?
function findClosestElement(sortedArr, target) {
  let left = 0;
  let right = sortedArr.length - 1;
  
  while (right - left > 1) {
    const mid = Math.floor((left + right) / 2);
    if (sortedArr[mid] === target) return mid;
    if (sortedArr[mid] < target) left = mid;
    else right = mid;
  }
  
  return (Math.abs(sortedArr[left] - target) <= 
          Math.abs(sortedArr[right] - target)) ? left : right;
}
Next Question (4/24)