JRockFL
asked on
Access values in array
I'm trying to understand this code and how I can access the values that have been added to the array.
Once the values have been added to array, how can I access id and url?
Once the values have been added to array, how can I access id and url?
var photoList = {};
var toUpload;
var id = $(this).attr('id');
var url = $(this).attr('rel');
toUpload = { id: id, url: url };
if (id in photoList) {
delete photoList[id];
}
else {
photoList[id] = toUpload;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
'welcome!
ASKER