JenMorgan / js-learning

0 stars 0 forks source link

Write function that returnes true if at least one element in array is of specified value #61

Open kartamyshev opened 4 years ago

kartamyshev commented 4 years ago
fn([1, 2, 3, 4], 2) // true
fn([12, 11, 10, 9], 2) // false
JenMorgan commented 4 years ago

function includesValue (arr, value) {
    return arr.includes(value);
}