js how to acess an key in an object code example
Example 1: for key value in object javascript
for (const [key, value] of Object.entries(object1)) {
console.log(`${key}: ${value}`);
}
Example 2: 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