function filter( arr, min, max ) {
var end = [];
for ( var key in arr ) {
if ( !isNaN( parseFloat( arr[ key ] ) ) && isFinite( arr[ key ] ) ) {
if ( arr[ key ] >= min && arr[ key ] <= max ) {
end.push( arr[ key ] )
}
}
}
return end;
}
var massive = [2, 'crack', 3, 6, 'find', 2];
var filter_end = filter( massive, 0, 5 );
alert( filter_end ) ; // 2,3,2