Is there a way to determine if an element appears more than once in an array?
var arr = [elm1, elm2, elm3, elm3, elm4, elm5, elm5, elm5, elm6, elm7];
if (elm appears multiple times in the array) {
// code to be executed
} else {
// do something else
}
Any ideas on how to achieve this?