what is return -1 in javascript

What is the return -1 on the second last line of the below code. How does it work? What is the use of that?

function findElement(arr) {
        let right_sum = 0, left_sum = 0;
  
        for (let i = 1; i < arr.length; i++)
            right_sum += arr[i];
  
        for (let i = 0, j = 1; j < arr.length; i++, j++) {
            right_sum -= arr[j];
            left_sum += arr[i];
  
            if (left_sum === right_sum)
                return arr[i + 1];
        }
 
        return -1;   //what is return -1
    }

Answer

It seems to be simulation of native arrays indexOf method. It returns -1 too, if no matches found.