let fruit=["apple", "banana", "cherry"]
fruit.price=1000;
console.log(fruit) // (3) ["apple", "banana", "cherry"]
console.log(fruit.price) // 1000
I don't know why fruit.price=1000;
this code run without error.
Please... explain easy way please
Thank you for reading.
Any help would be more appreciated.