+ 1
What's the 3 means?
var courses = new Array(3); courses[0] = "HTML"; courses[1] = "CSS"; courses[2] = "JS"; document.write(courses[2]); - Hello peers, may I ask, what do “3” means in new Array? Thanks in advance!
1 Resposta
+ 11
3 means the size of the array..You see the array consists 3 elements (0-2) and it can't contain any more.So it is the size of the array