1obj = { name: 'Bobo' } //key: value
2obj.newName = obj.name // on object create new key name. Assign old value to this
3delete obj.name //delete object with old key name
1function renameProperty(obj, oldName, newName) {
2 obj[newName] = obj[oldName];
3 delete obj[oldName];
4}