A simple `.forEach()` stop after first iteration depending on the content...

My initial loop looked like this :

```
document.getElementsByClassName("app-form-to-js").forEach(function(node) {
    node.classList.remove("app-form-to-js");
    jsForms[node.id]=node.cloneNode(true);
    node.remove();
});

```

While the first loop occur, it doesn't go beyond.  

Then, after some tweaking, I managed to get the loop working with this code :

```
document.getElementsByClassName("app-form-to-js").forEach(function(node) {
    jsForms[node.id]=node.cloneNode(true);
    jsForms[node.id].classList.remove("app-form-to-js");
});

```

But, the moment I use `node.classList.remove("app-form-to-js");` or `node.remove();` in the loop,  

it will always stop after first iteration.

Any idea why loop is stopping after first iteration (so it iterate at least once) if I alter the node?