array-of-objects-for-in-for-of-loops

  • how to deal with loops on objects and pushing it into a new array.

The following snippet shows how to create or push a new key value into an object

let obj = {}
obj['firstName'] = 'Juan'
console.log(obj);

//  { firstName: 'Juan' }