javascript how to create an array code example
Example 1: how to create an array in node js
var myArray = new Array();
var mySecondArray = [];
Example 2: javascript declare array
var array = []
Example 3: how to create an array in javascript
let fruits = ['Apple', 'Banana']
console.log(fruits.length)
Example 4: how to create array in javascript
let array_1 = new Array(2);
arr.push("James");
arr.push("Fred");
let array_2 = ["James", "Fred"];
Example 5: how to create an array in javascript
let myVar = ["1","2","3"];