var firstList= [1,2,3,4,5];
var secondList= [3,5];
// compare result : 3,5
// return true
var firstList= [1,2,3,4,5];
var secondList= [6,7,8];
// compare result : null
// return false
How can I compare elements the two lists? If there is matching data in the two lists, return true. if there is no match, return false