下列程序的运行结果是( )。var arr1=[1,2,3,4,5,6];var arr2=["hello","world"];var arr=arr1.concat(arr2);document.write(arr1);
A: "hello","world"
B: 1,2,3,4,5,6
C: 1,2,3,4,5,6,"hello","world"
D: "hello","world",1,2,3,4,5,6
A: "hello","world"
B: 1,2,3,4,5,6
C: 1,2,3,4,5,6,"hello","world"
D: "hello","world",1,2,3,4,5,6
举一反三
- 给定多维数组arr:arr =[[1 2 3] [4 5 6] [7 8 9]],可以得到[[5 6] [8 9]]的操作是 A: arr[1:2,1:2] B: arr[1:3,1:3] C: arr[1:,1:] D: arr[:,:]
- 下面代码的运行结果是( )。 var arr=[1,2,3,4,5,6]; var index=arr.indexOf(3,6); console.log(index); A: 2 B: -1 C: 5 D: 0
- 存在多维数组arr,arr =np.array([[1 2 3] [4 5 6] [7 8 9]])数组arr.T的输出为 A: array([[1, 4, 7], [2, 5, 8], [3, 6, 9]]) B: array([[1, 2, 3], [4, 5, 8], [7, 6, 9]]) C: array([[1, 4, 7], [2, 5, 6], [3, 8, 9]]) D: array([[9, 4, 7], [2, 5, 8], [3, 6, 1]])
- 在javascript中,下面代码输出的结果是()var arr = [1,2,3,4];for(var i in arr){ if(i%2==0){console.log(arr[i]);}}[/i] A: 1 B: 3 C: 2 D: 4
- 创建数组arr=[ [0 1 2 3] [4 5 6 7] [8 9 10 11]],则arr*3=___________。