{"ScriptPreparationCode":"var arr1 = Array(1000).fill().map(() =\u003E Math.round(Math.random() * 100));\r\nvar arr2 = Array(1000).fill().map(() =\u003E Math.round(Math.random() * 100));","TestCases":[{"Name":"Test reduce","Code":"const fn = (arr1, arr2) =\u003E {\r\n return arr2.reduce((acc, item) =\u003E {\r\n if (arr1.includes(item) \u0026\u0026 !acc.includes(item)) {\r\n acc.push(item);\r\n }\r\n\r\n return acc;\r\n }, []);\r\n};\r\n\r\nfn(arr1, arr2)","IsDeferred":false},{"Name":"Test 2","Code":"const fn = (arr1, arr2) =\u003E {\r\n return Array.from(new Set(arr2.filter((item) =\u003E arr1.includes(item))));\r\n};\r\n\r\nfn(arr1, arr2)","IsDeferred":false}]}