{"ScriptPreparationCode":"var demoStr = \u0027This is a demo of a long string with multiple spaces occasionally added throughout it.\u0027;\r\n\r\nfunction regexReplace(str) {\r\n return str.replace(/\\s\u002B/g, \u0027 \u0027);\r\n};\r\n\r\nfunction arrayReplace(str) {\r\n let resultArr = [];\r\n const strArr = str.split(\u0027 \u0027);\r\n for (let i = 0; i \u003C strArr.length; i\u002B\u002B) {\r\n if (strArr[i] != \u0027\u0027) {\r\n resultArr.push(strArr[i]);\r\n }\r\n }\r\n return resultArr.join(\u0027 \u0027);\r\n};","TestCases":[{"Name":"regexReplace","Code":"regexReplace(demoStr);","IsDeferred":false},{"Name":"arrayReplace","Code":"arrayReplace(demoStr);","IsDeferred":false}]}