{"ScriptPreparationCode":"var max1 = 100000; // 100,000 (100 Thousand)\r\nvar max11 = 100000; // 100,000 (100 Thousand)\r\n\r\nvar max2 = 10000000; // 10,000,000 (10 Million)\r\nvar max3 = 100000000; // 100,000,000 (100 Million)\r\n\r\nvar arr1 = [];\r\nfor (var i = 0; i \u003C= max1; i\u002B\u002B) { arr1.push(i); }\r\n\r\nvar arr2 = [];\r\nfor (var i = 0; i \u003C= max11; i\u002B\u002B) { arr2.push(i); }\r\n\r\nvar arr3 = [];\r\n//for (var i = 0; i \u003C= max3; i\u002B\u002B) { arr3.push(i); }","TestCases":[{"Name":"Native","Code":"const intersection = (a1 = [], a2 = []) =\u003E\r\n{ const s =\r\n new Set(a1)\r\n \r\n const result =\r\n []\r\n\r\n for (const x of a2)\r\n if (s.has(x))\r\n result.push(x)\r\n\r\n return result\r\n}\r\nlet c = intersection(arr1, arr2)","IsDeferred":false},{"Name":"Lodash.js filter","Code":"let c = _.intersection(arr1, arr2)","IsDeferred":false}]}