var obj = {
first: 1,
second: "foo"
};
function eachProp(operation) {
operation('first', obj.first);
operation('second', obj.second);
}
eachProp(function(name, value) {
alert('The value of '+ name +' is '+
value);
});