1function testArrayConcat() { 2 var array = 'abc'.match(/(a)(b)(c)/); 3 var result = array.concat(); 4 var expectedResult = ["abc", "a", "b", "c"]; 5 6 if (result.length != 4) 7 throw new Error("Runtime array length is incorrect"); 8 for (var i = 0; i < result.length; i++) { 9 if (result[i] != expectedResult[i]) 10 throw new Error("Runtime array concat result is incorrect"); 11 } 12}; 13 14testArrayConcat(); 15