So I have an array like this var arr = [foo1:"bar1", foo2:"bar", foo3:"bar3"].
Then I used this arr.splice(index, 1); given that the index is dynamic lets just say it's 0 but the value foo1:"bar1" wasn't removed from the array.
Also the above array works on my code but it shows an error on JSFiddle. I have no idea why.
Thanks.
EDIT I dont know why it doesn't show an error on my console but here's how I did it.
var arr = [];
I dynamically added value to the array by doing
arr["foo"] = "bar";
which resulted to [foo:"bar"];
Any idea guys?
EDIT 2

var arr = [{foo1:"bar1"},{ foo2:"bar"}, {foo3:"bar3"}];Also the above array works on my code?