I am currently expanding my knowledge on key/value arrays and object/properties.
I have a list of items stored in an array.
var itemList = [firstitem, seconditem];
How can I assign properties to each item in the itemList?
itemList[0].name = "pear";
itemList[0].value = "$5";
Am I doing this correctly?
var items = [
{
"name": "pear",
"value": "$2"
}, {
"name": "apple",
"value": "$5"
}];