how to initialize a empty array in javascript code example Example: create empty array javascript const myArray1 = [] // or... const myArray2 = new Array()