[thelist] [javascript] for ... in - prevent certain properties from showing up

apathetic apatheticgenius at gmail.com
Fri Nov 19 04:07:17 CST 2004


Instead of using the associativeArray object detailed in your post,
how about using something like:

function countObject( obj ) {
    var len = 0;    
    for( var val in obj ) {
        len++;
    }
    return len;
}

-- 
http://www.apatheticgenius.com/

http://elaborate.sourceforge.net/ - PHP/MySQL wiki engine
http://www.hyperlinkage.com/ - Online RSS reader


More information about the thelist mailing list