I want to create C# like list in JavaScript. In C# we can say List<string> ListName = new List<string>();
And then it allows you to add N number of members to the list by using add method.
ListName.add("1");
ListName.add("2");
..
..
ListName.add("N");
How can I create similar list in JavaScript.
I was thinking of using array but it forces me to specify the size.
var a = new Array(5);
a = [0, 0, 0, 0, 0];
var a = new Array(0, 0, 0, 0, 0);