CIW
1D0-635 · Question #44
You want to display a series of elements. Which choice demonstrates the correct syntax for an array in JavaScript?
The correct answer is B. var myArray = new Array(1,2,3,4,5). See the full explanation below for the reasoning.
Question
You want to display a series of elements. Which choice demonstrates the correct syntax for an array in JavaScript?
Options
- Avar myArray = Array(1,2,3,4,5)
- Bvar myArray = new Array(1,2,3,4,5)
- Cvar myArray = new Array(1,2,3,4,5)
- Dvar myArray = Array(1,2,3,4,5)
How the community answered
(48 responses)- A2% (1)
- B79% (38)
- C13% (6)
- D6% (3)
Community Discussion
No community discussion yet for this question.