{"ScriptPreparationCode":"function makeid(len = 5) {\r\n var text = \u0022\u0022;\r\n var possible = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022;\r\n\r\n for (let i = 0; i \u003C len; i\u002B\u002B)\r\n text \u002B= possible.charAt(Math.floor(Math.random() * possible.length));\r\n\r\n return text;\r\n}\r\n\r\nvar arr1 = []\r\nvar arr2 = []\r\n\r\nfor (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n\tarr1.push(makeid())\r\n \tarr2.push(makeid())\r\n}\r\n\r\n// To ensure that both arrays has at least 1 element in common\r\narr1[arr1.length - 1] = arr2[0]","TestCases":[{"Name":"Lodash","Code":"var intersection = _.intersection(arr1, arr2);","IsDeferred":false},{"Name":"spread operator","Code":"var intersection = arr1.filter(param =\u003E arr2.includes(param));","IsDeferred":false}]}