Not every possible mutated form of every word actually occurs.
IE: Can't generate: Can generate: data1 data2 data1 data1 data2 data2 data1 data2 Also, the function performs no type of error checking on your array and will throw a DOMException if a key value you used in your array contains invalid characters for a proper DOM tag.