{"ScriptPreparationCode":"var list = [];\r\nfor (var i = 0; i \u003C 100; i\u002B\u002B) {\r\n list.push(i);\r\n}\r\nvar startIndex = 0;\r\nvar endIndex = 99;","TestCases":[{"Name":"splice","Code":" const result = Array.from(list);\r\n const [removed] = result.splice(startIndex, 1);\r\n result.splice(endIndex, 0, removed);\r\n return result;","IsDeferred":false},{"Name":"reduce","Code":"const itemToMove = list[startIndex];\r\n return list.reduce((acc, item, index) =\u003E {\r\n if (index === startIndex) {\r\n return acc;\r\n }\r\n if (index === endIndex) {\r\n return startIndex \u003C endIndex\r\n ? [...acc, item, itemToMove]\r\n : [...acc, itemToMove, item];\r\n }\r\n return [...acc, item];\r\n }, []);","IsDeferred":false}]}