---
# System prepended metadata

title: javascript snippets
tags: [javascript]

---

###### tags: `javascript`

# javascript snippets

```jsx=
function removeArrItems(arr) {
    let timerID
    const removeSingle = () => {
       arr.shift()
       console.log(arr.length)
       if (arr.length === 0) {
          clearInterval(timerID)
       }
    }
    timerID = setInterval(removeSingle, 3000)
}
```


