Question: Which of the following options will create an array that contains four elements? Option A: var list = [a,b,c,d]; Option B: var list = [];

Which of the following options will create an array that contains four elements?

Option A:

var list = [a,b,c,d];

Option B:

var list = [];

list.push(a);

list.push(b);

list.push(c);

list.push(e);

Option C:

var list = [a];

list.push(b);

list.push(c);

list.push(e);

Option D:

var list = new Array();

list.add(a);

list.add(b);

list.add(c);

A. Options A & C

B. Options A, B, C

C. Options C & D

D. Option D

E. Options A, B, C & D

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!