How do I remove a property from a JavaScript object?

Опубликовано: 01 Октябрь 2024
на канале: Code Samples
163
2

#short
#javascript
#object
#properties
Given an object:
let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI",
"regex": "^http://.*"
};

How do I remove the property regex to end up with the following myObject?
let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI"
};
kangax: https://stackoverflow.com/users/13065...
Understanding delete: http://perfectionkills.com/understand...
destructuring: https://developer.mozilla.org/en-US/d...