I know that the memory allocation in js differs from languages like c++ language when I write like below
var arr=[]
arr[10000]=34;
or write
var arr=[]
arr[10]=34;
or
var arr=new Array(10000)
arr[10]=34;
does they take the same memory? only one block(because of number 34) thanks in advance