javascript - Set dynamic value to Array in JS like PHP -


this question has answer here:

my question how set value array in js php? example: in php have array named arr, set new value in n position using

arr[] = value 

but try same in js display error

use push command

arr.push(value) 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - href attribute breaking an element -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -