i'm trying to push a string elements to sized array but when pushing an element the sized array start insert the elements in the last index of the array and grow but i want to insert the first element in the index [0] and second on [1] and so on till index [3] but i don't know why it start to insert elements after the last index and grow when add more element my code :
var users = new Array(3);
users.push(someData);
console.log(users);
console.log(users.length)
and the result like this:
[ , , , 'd', 'dd' ]
5