<script type="text/javascript"> $(function(){ var arr = [1,2,3,4,5]; var bigNum = $.map(arr,function(num){ if(num>2){ return num; } }); console.log(bigNum) }) </script>