DEV Community

Discussion on: Array Indexing Method

learnwithdrona profile image

This is good Shubham. Why JS cannot support Pythonic approach to have negative numbers within indexing square brackets.

shubhambattoo profile image
Shubham Battoo Author

Thats already there, if you do something like.

arr[-1] ; // undefined
Enter fullscreen mode Exit fullscreen mode

That is why they are not going with that approach.