定义Javacsript 数组的方法正确的是( )。
A: var arrayList={“cat”,”dog”,”monkey”};
B: var arrayList=new Array {“cat”,”dog”,”monkey”};
C: var arrayList= new Array (“cat”,”dog”,”monkey”);
D: var arrayList= new Array [“cat”,”dog”,”monkey”];
A: var arrayList={“cat”,”dog”,”monkey”};
B: var arrayList=new Array {“cat”,”dog”,”monkey”};
C: var arrayList= new Array (“cat”,”dog”,”monkey”);
D: var arrayList= new Array [“cat”,”dog”,”monkey”];
举一反三
- 若Animal是Cat,Dog的父类,则下列选项中,正确的是() A: Animal animal = new Cat(); B: Animal a = new Cat(); Cat cat = (Cat) a; C: Animal animal = new Dog(); D: Cat cat = (Cat)new Dog();
- 若Animal是Cat,Dog的父类,则下列选项中,正确的是() A: Animal animal = new Cat(); B: Cat cat = (Cat)new Animal(); C: Animal animal = new Dog(); D: Cat cat = (Cat)new Dog();
- (7-1)定义了Animal类、Cat类和Dog类,则()代码段是正确的。classAnimal{};classCatextendsAnimal{}classDogextendsAnimal{} A: Dog[] a = new Dog[5];a[0] = new Cat(); B: Animal a = new Animal[5];a[0] = new Animal(); C: Dog[]a = new Dog[5];a[0] = new Animal(); D: Cat[]a = new Cat[5];a[0] = new Cat();
- What was the narrator's favorite pet? A: A dog B: A monkey C: A parrot D: A black cat
- 下列选项中,定义JavaScript 数组的方法不正确的是( ) A: var arr =new Array(); B: var arr =new Array(4); C: var arr =new Array("George","John","Thomas"); D: var arr=new Array[3];