Thank you very much for all your replies, the detail from @jeff_bloomer really helped explain it more, but thanks very much to @amgup @Brian_Johnson_ @yuhuisg I ended up using a combination of all your messages, but could only pick one solution. Thanks everyone!
Inside our digitalData datalayer we have an Array which captures all the Javascript errors that happen on the page and list them inside it. How can I then take this array and split it up to pass to an eVar? I'm fine doing it for a single javascript varaiable within the dataLayer, just unsure of how ...