{"ScriptPreparationCode":null,"TestCases":[{"Name":"reduce","Code":"const firstArr = new Array(200).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\nconst secondArr = new Array(250).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\n\r\nconst result = secondArr.reduce(\r\n (acc, item) =\u003E {\r\n return acc.includes(item) ? acc : [...acc, item]\r\n },\r\n [...firstArr]\r\n)","IsDeferred":false},{"Name":"loop","Code":"const firstArr = new Array(200).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\nconst secondArr = new Array(250).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\n\r\nconst result = []\r\nfor (let i = 0; i \u003C firstArr.length; i\u002B\u002B) {\r\n if (result.indexOf(firstArr[i]) == -1) result.push(firstArr[i])\r\n}\r\nfor (let i = 0; i \u003C secondArr.length; i\u002B\u002B) {\r\n if (result.indexOf(secondArr[i]) == -1) result.push(secondArr[i])\r\n}","IsDeferred":false},{"Name":"concat and filter","Code":"const firstArr = new Array(200).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\nconst secondArr = new Array(250).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\n\r\nconst concatArr = firstArr.concat(secondArr)\r\nconst result = concatArr.filter((item, idx) =\u003E concatArr.indexOf(item) === idx)","IsDeferred":false},{"Name":"set","Code":"const firstArr = new Array(200).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\nconst secondArr = new Array(250).fill(undefined).map((val, i) =\u003E \u0060item${i}\u0060)\r\n\r\nconst result = [...new Set([...firstArr, ...secondArr])]","IsDeferred":false}]}