Поток управления / Прерывание потока управления

let firstMatchValue = -1
let array1 = [123]
let array2 = [234]

firstLoop: for (let i in array1) {
    for (let n in array2) {
        if (array1[i] === array2[n]) {
            firstMatchValue = array1[i]
            break firstLoop
        }
    }
}
//firstMatchValue is 2
console.log(firstMatchValue)