let myArr = ; let myArr = new Array();
let myArr = ["Mon", "Tue", "Wed", "Thu", "Fri"]; let myArr = new Array("Mon", "Tue", "Wed", "Thu", "Fri");
You can print it on the console using a console.log statement. For example,
This will give the output.
["Mon", "Tue", "Wed", "Thu", "Fri"]
Though not used much, you can also create an array by specifying its length as follows −
let myArr = new Array(5);
This will create an array of size 5.