All interview questionsIn JavaScript, what could go wrong with regular expression flag?AdvancedAnswerGlobal regex objects can retain lastIndex state across repeated tests.