How can I call each function in this object?
var obj = {
hey1: function() {
alert('hey');
},
hey2: function() {
alert('hey2');
},
hey3: function() {
alert('hey3');
}
}
I'd like each function to run one after the other. I'm looking for something like:
for (var hey in obj) {
hey();
}
But obviously that doesn't run (otherwise I wouldn't be asking this question).
Thanks guys!!!