**Tell us what’s happening:**

If Array.shift() removes first element from an arrray then how is it working here ? Can someone explain it at every iteration by using this example ( dropElements([1, 2, 3], function(n) {return n < 3; }); )

**Your code so far**

```
function dropElements(arr, func) {
// Drop them elements.
for(var i=0; i<arr.length; i++){
if(func(arr[0])){
break;
}else{
arr.shift();
}
}
return arr;
}
dropElements([1, 2, 3], function(n) {return n < 3; });
```

**Your browser information:**

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

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it