Can anyone explain why "script" is part of the output array and how this regex is interpreted in the split function?
console.log(
"is javascript my favorite language?".split(/JAVA(Script)/i)
);
outputs
["is ", "script", " my favorite language?"]