If you dont want to use generator syntax, you can use another way define iterator function.
var options = {
male: 'John',
female: 'Gina',
rel: 'Love',
[Symbol.iterator]: function () {
var self = this;
var values = Object.keys(this);
var i = 0;
return {
next: function () {
return {
value: self[values[i++]],
done: i > values.length
}
}
}
}
};
for (var p of options) {
console.log(`Property ${p}`);
}