{"ScriptPreparationCode":null,"TestCases":[{"Name":"Array.prototype.concat","Code":"const arrayLength = 100000;\r\n\r\n// Function to generate random data (number, string, or boolean)\r\nconst getRandomData = () =\u003E {\r\n const randomNumber = Math.floor(Math.random() * 1000); // Random number between 0 and 999\r\n const randomString = Math.random().toString(36).substring(7); // Random string\r\n const randomBoolean = Math.random() \u003C 0.5; // Random boolean (true or false)\r\n\r\n // Randomly choose one of the three data types\r\n const randomDataType = [randomNumber, randomString, randomBoolean][\r\n Math.floor(Math.random() * 3)\r\n ];\r\n\r\n return randomDataType;\r\n};\r\n\r\nconst largeArray1 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\nconst largeArray2 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\n\r\nvar other = largeArray1.concat(largeArray2);","IsDeferred":false},{"Name":"spread operator","Code":"const arrayLength = 100000;\r\n\r\n// Function to generate random data (number, string, or boolean)\r\nconst getRandomData = () =\u003E {\r\n const randomNumber = Math.floor(Math.random() * 1000); // Random number between 0 and 999\r\n const randomString = Math.random().toString(36).substring(7); // Random string\r\n const randomBoolean = Math.random() \u003C 0.5; // Random boolean (true or false)\r\n\r\n // Randomly choose one of the three data types\r\n const randomDataType = [randomNumber, randomString, randomBoolean][\r\n Math.floor(Math.random() * 3)\r\n ];\r\n\r\n return randomDataType;\r\n};\r\n\r\nconst largeArray1 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\nconst largeArray2 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\n\r\nvar other = [ ...largeArray1, ...largeArray2 ]","IsDeferred":false},{"Name":"Push","Code":"const arrayLength = 100000;\r\n\r\n// Function to generate random data (number, string, or boolean)\r\nconst getRandomData = () =\u003E {\r\n const randomNumber = Math.floor(Math.random() * 1000); // Random number between 0 and 999\r\n const randomString = Math.random().toString(36).substring(7); // Random string\r\n const randomBoolean = Math.random() \u003C 0.5; // Random boolean (true or false)\r\n\r\n // Randomly choose one of the three data types\r\n const randomDataType = [randomNumber, randomString, randomBoolean][\r\n Math.floor(Math.random() * 3)\r\n ];\r\n\r\n return randomDataType;\r\n};\r\n\r\nconst largeArray1 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\nconst largeArray2 = Array.from({ length: arrayLength }, () =\u003E getRandomData());\r\n\r\nvar other = largeArray1.push(...largeArray2);","IsDeferred":false}]}