Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
can someone help me how do i put the output in array form without using built-in function
function filterRange(arr, min, max){
newArr = []
for(var i=0; i<arr.length; i++){
 if(arr[i] > min && arr[i] < max)
     newArr += arr[i];
}
return newArr;
}
filterRange([1,3,5,7,10], 4, 8);
filterRange([1,3,5,7,10], -1, 4);
filterRange([2,4,3,5], 2, 6);

/*OUTPUT THAT I GOT ARE: 57 13 435

it should return [5,7] , [1,3], [4,3,5]

*/

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!