How to use array in Java Script? Also explain types of array?
Answers
Answered by
1
Answer:
JavaScript arrays are a special type of object. To access an array item, the [] operator is used, for example colors[4]. The [] operator converts the expression inside the square brackets to a string.
Answered by
4
We can declare an Array in JavaScript by using the following syntax,
var array_name = [item1, item2, ...]; or,
var array_name = new Array(item1, item2, ...);
Similar questions