I wanted some function that would return TRUE when all values within an array were equal or all were different, and return FALSE if they were not all equal and not all different. If you have not understood, I'll explain with examples:
Ex:
If I have the following array (s) for verification:
var arr = ['xx','xx','xx']; //(todos iguais)
//ou
var arr = ['xx','yy','zz']; //(todos diferentes)
The function would return TRUE, but if it were an array in which the values are not all equal or all different would return FALSE, as in the following situation:
var arr = ['xx','xx','zz']; //(Os valores não todos iguais, e nem todos diferentes)
Eai? Does anyone have any idea how I can do this?