JSFiddle - React, Tailwind, and code Playground
JavaScript
// make objects iterable
Object.prototype[Symbol.iterator] = function* () {
const values = Object.values(this);
let value;
while( value = values.shift() ) {
yield value;
}
}
var myObject = { firstName: 'John', lastName: 'Doe', age: 26 };
console.log( myObject.includes('Doe') ); // John Doe 26