var log=[]; // innerHTML [ "3","4","5","6","7"].forEach( function( a ){ log.push( Boolean( a == '1'|'2' ) ); } ) alert( log.join(",") ) // все TRUE