Help Me/Question How To Use Array In Javascrip?

steve taylor

White Belt
We know that array is the special variable which hold the similar type of data in continuous memory location. How to array can be used by JavaScript and how to create array in JavaScript? How many properties and methods are available to implement array in JavaScript ? Is looping possible in JavaScript.
 

RADHESHYAM GUPTA

White Belt
Array is a special value which can hold two or more than two values at a same time.
You can use an array in javascript by this code:-
<html>
<head>
<title></title>
<Script >
var Year[ ]; // It is a empty array.
var Year ['January', 'February', 'March', 'April']; // Array with elements.
alert(year[2]);
</script>
<head>
<body>
</body>
<html>/
 

saurabh mathur

Well-Known Member
To access array in JavaScript, you will have to use the brackets and a number like this myArray[2]. Array elements do not have all to be same type of value. Arrays are the container like values that can hold other values.

web hosting
 
The JavaScript Array object is a global object that is used in the construction of arrays; which are high-level, list-like objects.

var fruits = ['Apple', 'Banana'];

console.log(fruits.length);
 

Saravanan28

Yellow Belt
The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
 
Top