实现创建一个 JavaScript 数组的语法是 _________
A: var txt = newArray("tim","kim","jim")
B: var txt = newArray(1:"tim",2:"kim",3:"jim")
C: var txt = new Array="tim","kim","jim"
D: var txt = newArray:1=("tim")2=("kim")3=("jim")
A: var txt = newArray("tim","kim","jim")
B: var txt = newArray(1:"tim",2:"kim",3:"jim")
C: var txt = new Array="tim","kim","jim"
D: var txt = newArray:1=("tim")2=("kim")3=("jim")
举一反三
- 创建一个包含3个元素的数组的方式是 A: var num=[1, 2, 3]; B: var num={1, 2, 3}; C: var num=new Array(1, 2, 3); D: var num=new Array[1, 2, 3];
- 下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
- 下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
- 以下数组的定义中____________是错误的 A: var a = new Array() B: var a = new Array(10); C: var a[10] = {1,2,3}; D: var a = ["1","2","3"];
- 冲击系数的变化范围是()。 A: 1≤kim≤1.7 B: 1≤kim≤1.8 C: 1≤kim≤1.9 D: 1≤kim≤2