My question is how I will set a value an array in JS like PHP? for example: in php I have an array named Arr, I set a new value in n position using
Arr[] = value
but I try to do same in JS but display an error
Use the push command
Arr.push(value)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With