---
title: "Comment by Steven Olsen on \"101 Ways to Work with Arrays in JavaScript\" | Hashnode"
description: "Bonus tip: how to turn your POO (plain old object) into an iteratable array! const obj1 = {a: 1 , b: 2 }; obj1.__proto__[Symbol.iterator] = function * ( ) { for"
url: "https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696/comment/63d155ee5ddbc4f31e812089"
---

[Discussion](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696)

Comment [101 Ways to Work with Arrays in JavaScript](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696)

[Steven Olsen](https://hashnode.com/@srjsdev)

[Jan 25, 2023](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696/comment/63d155ee5ddbc4f31e812089)

Bonus tip: how to turn your POO (plain old object) into an iteratable array!

```
const obj1 = {a: 1, b: 2};
obj1.__proto__[Symbol.iterator] = function* () {
  for (const k in this) yield [k, this[k]];
}
for (const e of obj1) console.log(e.join(":"))
// a:1
// b:2
```
