I've this code :
data["id"] = 0;
console.log(data); // first log
found["test"] = data;
delete data.id;
console.log(data); // second log
where data and found is objects created before.
My console print two times the data objects without the "id" properties.
If i replace the delete with : data.id = '';
the console print two times the data object with an empty id property.
Also the found["test"]
has the object without the id ( or with id = "" depending which experiment I'm in )
Could someone help me understand what's happening ?