for-in statement: null and undefined
khansen at trolltech.com
Thu Jul 3 08:42:53 PDT 2008
In the current public ES4 reference implementation , iterating over
null and undefined is a no-op instead of a TypeError, which is in line
with the proposal at  (which points out that existing web browsers
already do this). However, the most recent ES3.1 draft  does not
incorporate this change. It's not mentioned in Douglas Crockford's
recommendations for modifications to ES  either, nor in the proposed
incompatibilities . So my question is, will this change be part of
ES3.1 or not (doesn't it have to, for ES4 compatibility's sake)? I can't
find a discussion of this issue anywhere.
By the way, in the ES4 reference implementation, iterating over strings
is a no-op as well; implementation bug, or are string properties not
enumerable in ES4? "X".hasOwnProperty(0) returns false, too.
More information about the Es4-discuss