{"ScriptPreparationCode":"var first = [...Array(100)].map(it =\u003E ~~(Math.random() * 1000));\r\nvar second = [...Array(20)].map(it =\u003E ~~(Math.random() * 1000));","TestCases":[{"Name":"Javascript Set intersection","Code":"const firstSet = new Set(first);\r\nconst secondSet = new Set(second);\r\n\r\nnew Set([...firstSet].filter(item =\u003E secondSet.has(item)));","IsDeferred":false},{"Name":"Lodash intersection","Code":"_.intersection(first, second)","IsDeferred":false},{"Name":"Javascript Array intersection","Code":"first.filter(it =\u003E second.includes(it))","IsDeferred":false},{"Name":"set2","Code":"const setA = new Set(first);\r\nconst setB = new Set(second);\r\n\r\nconst _intersection = new Set()\r\n for (const elem of setB) {\r\n if (setA.has(elem)) {\r\n _intersection.add(elem)\r\n }\r\n }","IsDeferred":false}]}