Consider this code:
var a = {
get aa() {
return 'aa';
}
};
Object.defineProperty(
a,
'bb',
{
get: function() {
return 'bb';
}
}
);
for(p in a) {
sys.puts(p + ': ' + a[p]);
}
The output is:
aa: aa
However property bb is perfectly accessible and working.
Why 'bb' is not visible in for..in loop?