I met some needs for deep copying original object literals, excepts some keys. I know spread operator doesn't copy deeply whole nested objects, however it's not main points for this question, so let's pass that issues.
so, back in original question, I see no difference between using delete keyword and assign undefined to target property which I want to remove.
const original = {
a: 1,
b: 2,
}
const copied = {
...original,
b: undefined
}
const explicitDelete = {
...original
}
delete explicitDelete["b"]
seems copied
way is less verbose, but it's totally okay with that way?