const myObj = {
  key1: 'val1',
  key2: 'val2',
  [Symbol.iterator]: function() {
    const keys = Object.keys(this);
    let i = 0;
    return {
      next: () => {
        if (i == keys.length) return {value: null, done: true};
        
        const result =  {
          value: this[keys[i]] + ' Ran The King',
          done: false
        };
        i++;
        return result;
      }
    }
  }
}

for(let i of myObj) {
  console.log(i); // val1 Ran The King, val2 Ran The King
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.