var arr=['12','34','5','67','87']; var a=$.grep(arr,function(value){ return value>20; }); document.writeln(a);