vue breaks out of array loop

Using the array method some, this loop will be jumped out of when return is true.

let arr = [1, 2, 'lemon', 4, 5,'666']
arr.some((item) => {
    if (item === 'lemon') {
        return true
    }
})

Guess you like

Origin blog.csdn.net/zzll1216/article/details/129672152