I have an array for example
var a = [1,4,6,1,1,1,1];
and I need to compare each element in array for similarity. If all of them are similar I need return true
, if one or more of them are different it should return false
Will be glad to get the answer.