{"ScriptPreparationCode":null,"TestCases":[{"Name":".map()","Code":"const list = [{name: \u0027john\u0027}, {name: \u0027doe\u0027}, {name: \u0027jane\u0027}, {name: \u0027dee\u0027}];\r\nconst targetIndex = 2;\r\n\r\nconst updated = list.map((item, itemIndex) =\u003E {\r\n\tif (itemIndex === targetIndex) return {name: \u0027albert\u0027};\r\n \treturn item\r\n});","IsDeferred":false},{"Name":".slice()","Code":"const list = [{name: \u0027john\u0027}, {name: \u0027doe\u0027}, {name: \u0027jane\u0027}, {name: \u0027dee\u0027}];\r\n\r\nconst targetIndex = 2;\r\nconst updated = [...list.slice(0, targetIndex), {name: \u0027albert\u0027}, ...list.slice(targetIndex \u002B 1)]","IsDeferred":false}]}