I get it to work on just replacing one instance with this code:
var someString = ['He', 'Test', 'of'];
var x = 0;
for (i = 0; i < 2; i++) {
document.body.innerHTML = document.body.innerHTML.replace(''+someString[i]+'', 'text');
}
How to get it to replace all the instances? I tried this:
/+someString[x]+/g
/'+someString[x]+'/g
since using a normal string, /Test/g would work how to i format it when the string is a variable string.