Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOps School!
Learn from Guru Rajesh Kumar and double your salary in just one year.
 the array is a single variable that is used to store different elements. It is often used when we want to store a list of elements and access them by a single variable.  the array is a reference to the multiple variables, in JavaScript array is a single variable that stores multiple elements.

syntax
var arrayname=[value1,value2.....valueN];
example
<!DOCTYPE html>
<html>
<head>
<title> alert in javascript</title>
</head>
<body>
<script>
var array=["shivam",
"ravi",
"abhiprit",
"omprakash",
"khushbu",
"nil"];
for(var a=0; a<6; a++)
{
document.write(array[a] + "<br>");
}
</script>
</body>
</html>
output
shivam
ravi
abhiprit
omprakash
khushbu
nil