Función con arreglo en Javascript (Fix JavaScript function) [closed]

function existe(arreglo, numero) {
    return arreglo.indexOf(numero) !== -1;
}

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf

Leave a Comment