renemane object key js
obj = { name: 'Bobo' } //key: value
obj.newName = obj.name // on object create new key name. Assign old value to this
delete obj.name //delete object with old key name
renemane object key js
obj = { name: 'Bobo' } //key: value
obj.newName = obj.name // on object create new key name. Assign old value to this
delete obj.name //delete object with old key name
js rename property
function renameProperty(obj, oldName, newName) {
obj[newName] = obj[oldName];
delete obj[oldName];
}
js rename property
obj.newProperty = obj.property
delete obj.property
javscript rename property name
a.Prop3 = a.Prop1;
delete a.Prop1;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us