Let\'s say I\'m given an array. The length of this array is 3, and has 3 elements:
var array = [\'1\',\'2\',\'3\'];
Eventually I will need
A rather crude solution for checking that it duplicates... You could check for a variation of the length using modulus:
Then if it might be, loop over the contents and compare each value until done. If at any point it doesn't match before ending, then it either didn't repeat or stopped repeating before the end.
if (array2.length % array1.length == 0){
// It might be a dupe
for (var i in array2){
if (i != array1[array2.length % indexOf(i)]) { // Not Repeating }
}
}