Javascript modify array objects property?
So I have an array, where I am trying to update an objects property value, like so:
this.tasks[5].status = "complete";
// Here is the object looks like when I log it:
{"rowID":16,"task":"and more stuff","status":"incomplete","inlist":"Homework"}
Yet the above code does not change the value, it does nothing. Is my syntax wrong, or is there something开发者_如何学C else in my code causing this?
It seems I can add properties to the object, but I cant modify existing ones. I also can delete the object, but cant delete a property from it.
Thanks
It must be something else in your code. Here are two pics of your setup working in both Chrome and IE9.
Chrome Console
IE9 Console
精彩评论