Answers for "return new data array from two arrays 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

return two arrays javascript

this.runThisFunctionOnCall = function(){
    var array1 = [11,12,13,14,15];
    var array2 = [21,22,23,24,25];
    var array3 = [31,32,33,34,35];

    return [
     array1,
     array2,
     array3
    ];
}
Posted by: Guest on September-05-2020

Code answers related to "return new data array from two arrays javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language