{"ScriptPreparationCode":"var arr = [{\r\n id: 1,\r\n name: \u0027Authors\u0027,\r\n value: \u0027authors\u0027,\r\n default: \u0027authors\u0027\r\n },\r\n {\r\n id: 2,\r\n name: \u0027Material\u0027,\r\n value: \u0027material\u0027,\r\n default: \u0027material\u0027\r\n },\r\n {\r\n id: 3,\r\n name: \u0027Topics\u0027,\r\n value: \u0027topics\u0027,\r\n default: \u0027not topics\u0027\r\n },\r\n {\r\n id: 4,\r\n name: \u0027Group\u0027,\r\n value: \u0027group\u0027,\r\n default: \u0027group\u0027\r\n }\r\n]\r\n\r\nfunction isResetFiltersAvailableFind(arr) {\r\n const value = arr.find(item =\u003E {\r\n const defaultValue = item.default;\r\n const value = item.value;\r\n\r\n return defaultValue !== value;\r\n });\r\n\r\n return Boolean(value);\r\n}\r\n\r\n\r\nfunction isResetFiltersAvailableSome(arr) {\r\n return arr.some(item =\u003E {\r\n const defaultValue = item.default;\r\n const value = item.value;\r\n\r\n return defaultValue !== value;\r\n });\r\n}\r\n\r\n\r\nfunction isResetFiltersAvailableFor(arr) {\r\n for (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n const item = arr[i];\r\n const defaultValue = item.default;\r\n const value = item.value;\r\n\r\n if (defaultValue !== value) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}","TestCases":[{"Name":"with find","Code":"isResetFiltersAvailableFind(arr)","IsDeferred":false},{"Name":"with some","Code":"isResetFiltersAvailableSome(arr)","IsDeferred":false},{"Name":"with for","Code":"isResetFiltersAvailableFor(arr)","IsDeferred":false}]}