{"ScriptPreparationCode":null,"TestCases":[{"Name":"reduce","Code":"const currency = [{usd:5},{ush:10},{usd:3}] \r\nlet obj =currency.reduce((acc,el)=\u003E {\r\n key=Object.keys(el);\r\n typeof acc[key]===\u0027undefined\u0027 \r\n ? acc[key]= el[key]\r\n : acc[key]=acc[key] \u002B el[key];\r\n return acc;\r\n})","IsDeferred":false},{"Name":"foreach","Code":"const currency = [{usd:5},{ush:10},{usd:3}] \r\nlet obj ={}\r\ncurrency.forEach(el =\u003E {\r\n key=Object.keys(el);\r\n typeof obj[key]===\u0027undefined\u0027 \r\n ? obj[key]= el[key]\r\n : obj[key]=obj[key] \u002B el[key];\r\n})","IsDeferred":false}]}