Answers for "delete list of keys from object javascript"

0

delete list of keys from object javascript

var obj = {a: 1, b: 2, c: 3, d: 4, e: 5 };

['c', 'e'].forEach(e => delete obj[e]);

// obj is now {a:1, b:2, d:4}
Posted by: Guest on July-26-2021

Code answers related to "delete list of keys from object javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language