{"ScriptPreparationCode":"var input = \u0022string with lots of spaces\u0022;","TestCases":[{"Name":"Regex","Code":"let output = input.replace(/\\s\u002B/gm, \u0022 \u0022);","IsDeferred":false},{"Name":"Split filter join","Code":"let output = input.split(\u0022 \u0022).filter(x =\u003E x).join(\u0022 \u0022);","IsDeferred":false},{"Name":"Loop","Code":"output = input;\r\nwhile (true) {\r\n let index = output.indexOf(\u0022 \u0022);\r\n if (index === -1) break;\r\n output = output.slice(0, index) \u002B output.slice(index \u002B 1)\r\n}","IsDeferred":false}]}