1// javascript allows negative indexing but not same way as in python
2const check = ["orange", "banana", "apple"]
3// console.log(check[-1]) //returns an error
4check[-1] = "negative fruit"
5console.log(check) // ["orange", "banana", "apple", -1: "negative fruit"]
6console.log(check[-1]) //returns "negative fruit"
7// so it creates a key-value pair