Answers for "get multiple values from array javascript"

0

how to get different values from two arrays js

let difference = arr1
                 .filter(x => !arr2.includes(x))
                 .concat(arr2.filter(x => !arr1.includes(x)));
Posted by: Guest on March-09-2021
0

find multiple javascript

// if you want to find multiple values in array
// You have to use 'filter' method

// Example:
let names= ["Style","List","Raw"];
let results= names.filter(x => x.includes("s"));
console.log(results); //["List"]
Posted by: Guest on July-26-2021

Code answers related to "get multiple values from array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language