Articles → JAVASCRIPT → Arrays In Javascript
Arrays In Javascript
What Are Arrays?
Syntax
var array_object = [list of items separated by comma];
Example
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script>
var alphabets = ["A", "B", "C"];
for (i = 0; i < alphabets.length; i++)
{
document.write(alphabets[i]);
}
</script>
</head>
<body></body></html>
Output