JS error thrown if no group is defined
Uncaught TypeError: splitedCookieValueEntry.split is not a function
This happens if the protoype of String is overridden.
All for loops should use the following of check the length carefully!
for(let i = 0; i < myArray.length; i++){