Can any one help me to sort this

RMAG news

let arr = [10,9.8,2,-20,null,0,-273,100,27,-10];
let n = -20;
function getRestNum(arr,n){
for (let i = 0; i< arr.length; i++){
if (arr[i]>n){
console.log(arr[i]);
}
}
}
getRestNum(arr,n);

Leave a Reply

Your email address will not be published. Required fields are marked *