How to create a JSON Array?

An array is an ordered collection of values. An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by , (comma).
JSON Array
(i) Empty Array:- that array has not value is called Empty Array.Empty Array always return, undefine value.

var myarr=[];
document.write(myarr[0]); //Output:- undefined

(ii) Array of strings:- In the below eg. array has 3 string values. array index start 0.

var myarr=["John","Tony","Alix"];
document.write(myarr[0]); //Output:- John
document.write(myarr[1]); //Output:- Tony
document.write(myarr[2]); //Output:- Alix

(iii) Array of Numbers:- In the below eg. array has 3 number values.

var myarr=[11,12,13];
document.write(myarr[0]); //Output:- 11
document.write(myarr[1]); //Output:- 12
document.write(myarr[2]); //Output:- 13

(iv) Array of Booleans :- In the below eg. array has 3 boolean values.

var myarr=[true,false,true];
document.write(myarr[0]); //Output:- true
document.write(myarr[1]); //Output:- false
document.write(myarr[2]); //Output:- true

(v) Array of Array :- In the below eg. array has 2 array.

<script>var myarr=[
document.write(myarr[0][0]); //Output:- a
document.write(myarr[0][1]); //Output:- b
document.write(myarr[0][2]); //Output:- c
document.write(myarr[1][0]); //Output:- x
document.write(myarr[1][1]); //Output:- y
document.write(myarr[1][2]); //Output:- z 

(vi) Array of Objects:- In the below eg. array has 2 object values.

var myarr_data = [ {}, {}, {}, {}, {} ];
document.write(myarr[0].name); //Output:- john
document.write(myarr[0].age); //Output:- 27
document.write(myarr[1].name); //Output:- tony
document.write(myarr[1].age); //Output:- 28

(vii) Array with Mixed Data Types:-

var myarr_data = [ {}, "text",11,null,true,[] ];