Whre do I belong challenge, 'for ... in' loop not working

Why isn’t "for in " working in that challenge ???

function getIndexToIns(arr, num) {
 ... sort the array
  

  
  for(let i in sortedArr){//for in not working... any explanation ???
    if(sortedArr[i] >= num){
      return i
    }

  }
  
  ... rest of the code
}

let x = getIndexToIns([10, 20, 30, 40, 50], 35);
console.log(x) 

Basic Algorithm Scripting: Where do I Belong | freeCodeCamp.org

this link may have explanation, see Array iteration and for...in section of an article:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.