How to insert a new element in between all elements of a JS array? : <p>I have an array <code>[a, b, c]</code>. I want to be able to insert a value between each elements of this array like that: <code>[0, a, 0, b, 0, c, 0]</code>.</p>

<p>I guess it would be something like this, but I can't make it works.</p>

<pre><code>for (let i = 0; i &lt; array.length; i++) {
    newArray = [
        ...array.splice(0, i),
        0,
        ...array.splice(i, array.length),
    ];
}
</code></pre>

<p>Thank you for helping me!</p>
