```
getIndexToIns([2, 5, 10], 15) should return 3
```

there are only 3 numbers how am i supposed to return 3

**Your code so far**

```
function getIndexToIns(arr, num) {
// Find my place in this sorted array.
arr.sort(function(a, b){return a-b});
for(let i = 0;i<arr.length;i++)
{
if (num <=arr[i])
{num = i;
break;}
}
}
return num;
}
getIndexToIns([40, 60], 50);
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/where-do-i-belong