Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to create a mixed array in javascript

The array in JavaScript can be created by using var keyword followed by array name as shown below:

var NumArr = [1,2,3,4,5];

You can create JavaScript array with mixed data types as well, for example, array containing both numbers and strings:

var MixArr = [1, “Mixed”, 2, “Array”];
Source by www.jquery-az.com #
 
PREVIOUS NEXT
Tagged: #create #mixed #array #javascript
ADD COMMENT
Topic
Name
1+4 =