1var obj = {a: 1, b: 2, c: 3, d: 4, e: 5 };
2
3['c', 'e'].forEach(e => delete obj[e]);
4
5// obj is now {a:1, b:2, d:4}
1const obj = {
2 a: 'dog',
3 b: 'cat',
4 c: 'mouse',
5 d: 'cow',
6 e: 'horse',
7 };
8const {a, e, ...updatedObject} = obj;
9
10// output
11console.log(updatedObject)