How to Create Different Types of Arrays in JavaScript ? Last Updated : 29 Jan, 2024 Improve Improve Like Article Like Save Share Report In JavaScript, you can create an array using square brackets [] and optionally initialize it with values. Here are a few examples: Empty Array: Create an empty array. let emptyArray = []; Array with Values: Initialize an array with values. let numbers = [1, 2, 3, 4, 5];let fruits = ["Apple", "Banana", "Orange"]; Mixed Data Types: Arrays in JavaScript can hold elements of different data types. let mixedArray = [1, "two", true, { key: "value" }]; Using the Array Constructor: You can also use the Array constructor to create an array. let newArray = new Array();let arrayWithValues = new Array(1, 2, 3, 4, 5); Like Article Suggest improvement Next Different Ways to Crate an Array of Objects in JavaScript ? Share your thoughts in the comments Add Your Comment Please Login to comment...