{"ScriptPreparationCode":null,"TestCases":[{"Name":"for","Code":" const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];\r\n let sum = 0;\r\n for(let i = 0; i \u003C arr.length; i\u002B\u002B){\r\n const item = arr[i] * 3;\r\n if(item % 4 === 0) sum \u002B= item;\r\n }\r\n console.log(sum); ","IsDeferred":false},{"Name":"map, filter, reduce","Code":" const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];\r\n const sum = arr.map(item =\u003E item * 3)\r\n .filter((item) =\u003E item % 4 === 0)\r\n .reduce((item, total) =\u003E total = total \u002B item);\r\n console.log(sum); ","IsDeferred":false},{"Name":"forEach","Code":" const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];\r\n let sum = 0;\r\n arr.forEach((item)=\u003E{\r\n item = item * 3;\r\n if(item % 4 === 0) sum \u002B= item;\r\n });\r\n console.log(sum); ","IsDeferred":false},{"Name":"map","Code":" const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];\r\n let sum = 0;\r\n arr.map((item)=\u003E{\r\n item = item * 3;\r\n if(item % 4 === 0) sum \u002B= item;\r\n });\r\n console.log(sum); ","IsDeferred":false}]}