{"ScriptPreparationCode":"//\r\nfilterFoo = (x) =\u003E\r\n x.action === \u0022BID\u0022 \u0026\u0026\r\n x.symbol.toLocaleLowerCase().includes(\u0027btc\u0027)\r\nsortFoo = (a, b) =\u003E {\r\n return a.price - b.price\r\n}\r\nreduceFoo = (value, item) =\u003E {\r\n return item.action === \u0022BID\u0022 \u0026\u0026\r\n item.symbol.toLocaleLowerCase().includes(\u0027btc\u0027) \u0026\u0026\r\n item?.price \u003E= value ?\r\n item?.price :\r\n value;\r\n}\r\n//\r\narr = [{\r\n price: 1000000000,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 1000000,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 111111,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 100000,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 11111,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 10000,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 1111,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 1000,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 100,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 1,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022BTC_IRT\u0022\r\n}, {\r\n price: 11111,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022BTC_USDT\u0022\r\n}, {\r\n price: 25000,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022USDT_IRT\u0022\r\n}, {\r\n price: 11111,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022USDT_IRT\u0022\r\n}, {\r\n price: 10000,\r\n action: \u0022ASK\u0022,\r\n symbol: \u0022USDT_IRT\u0022\r\n}, {\r\n price: 1111,\r\n action: \u0022BID\u0022,\r\n symbol: \u0022USDT_IRT\u0022\r\n}]","TestCases":[{"Name":"a","Code":"const sorted = arr.filter(filterFoo).sort(sortFoo)\r\nconst bigPrice = sorted[0].price","IsDeferred":false},{"Name":"b","Code":"const bigPrice = arr.reduce(reduceFoo, 0)","IsDeferred":false}]}