{"ScriptPreparationCode":null,"TestCases":[{"Name":"indexed","Code":"let objectArray = [{text: \u00224\u0022},{text: \u00222\u0022},{text: \u00222\u0022},{text: \u00224\u0022},{text: \u00222\u0022},{text: \u00222\u0022},];\r\nlet total = 0;\r\nlet indexed = [0,3];\r\nfor(let i = 0; i \u003C indexed.length; i\u002B\u002B){\r\n\ttotal \u002B= Number(objectArray[indexed[i]].text);\r\n \tobjectArray.splice(indexed[i], 1);\r\n \tchangeIndex(i, 1);\r\n}\r\n \r\nfunction changeIndex(from, change){\r\n\tfor(let i = from; i \u003C indexed; i\u002B\u002B){\r\n \tindexed \u002B= change;\r\n }\r\n}","IsDeferred":false},{"Name":"find","Code":"let objectArray = [{text: \u00224\u0022},{text: \u00222\u0022},{text: \u00222\u0022},{text: \u00224\u0022},{text: \u00222\u0022},{text: \u00222\u0022},];\r\nlet total = 0;\r\nlet targetIndex = 0;\r\nlet target = objectArray.find(findCase);\r\nwhile(target){\r\n\ttotal \u002B= Number(target.text);\r\n \tobjectArray.splice(targetIndex, 1);\r\n \ttarget = objectArray.find(findCase);\r\n}\r\nfunction findCase(e,i){\r\n\tif(e.text == \u00224\u0022){\r\n targetIndex = i;\r\n return true;\r\n }\r\n}","IsDeferred":false}]}