I am trying to document some code and this sentence sounds confusing.
Replaces the existing item associated with the provided key
with newItem.
I am tempted to put a comma here but I am not sure if it would be correct.
Replaces the existing item associated with the provided key,
with newItem.
If it's incorrect, how can I state my intention clearly?
Best Answer
I would write:
And if the key is something that's common between the two items, then you could say something like this:
Or