1The array in JavaScript can be created by using var keyword followed by array name as shown below:
2
3var NumArr = [1,2,3,4,5];
4
5You can create JavaScript array with mixed data types as well, for example, array containing both numbers and strings:
6
7var MixArr = [1, “Mixed”, 2, “Array”];