JS

Arrays in JavaScript - Initialize an array in JS

4.

Which of the following is a valid way to declare and initialize an array in JavaScript?

const array = [1, 2, 3];

let array = [1, 2, 3];

var array = [1, 2, 3];

array = [1, 2, 3];