Fix simple issue in the documentation
M-AminAlizadeh opened this issue · 3 comments
M-AminAlizadeh commented
This is the link to the issue
What is the problem?
The problem is in the code part in the arr variable
this is what is written in the code part
const arr = ['a', 'b']
// In the same way, we can change the contents of this array
arr.push('c')
arr[1] = 'd'
What should be changed to fix the problem?
In the arr[1] = 'd'
should change to arr[1] = 'b'
EskiMojo14 commented
This isn't an issue. The documentation is making the point that you can change the second item of the array with the assignment.
Your suggested change is not changing the array item, it's exactly the same.
M-AminAlizadeh commented
Thank you for responding @EskiMojo14
My bad
But it should have only one change like object one, not two different changes push() method
and indexing
It's misleading the reader in my opinion
EskiMojo14 commented