Tuesday, July 31, 2018

Find Duplicate in Two arrays


var x=[10,20,40,40,90]

var y=[11,10,20,90]

x.map(function(e){
if(y.indexOf(e)>-1){
console.log(e)
    }
});


No comments:

Post a Comment

function declaration, expression and call/invoke/execution

  The  function  declaration defines a function with the specified parameters. The  function   keyword can be used to define a function ins...