How to create copy of an Array?
<p>I have this code: </p>

<pre><code>const settings = {
            notes: [new musicnote(480,400,"wav/1.wav","cyan",true)],
            emiters: [new emiter(300,240), new emiter(340,240)]
        }

var notes = [];
var emiters = [];

var LoadLevel = function (level) {
    if(settings[level] !== undefined){
        currentLevel = level;
        notes = settings[level].notes;
        emiters = settings[level].emiters;
    }
}
</code></pre>

<p>And when I change <code>emiters</code> array in game (delete or add some) it does the same to the <code>settings.emiter</code> array. So my question is - how to pass a new array instead of a reference to array in <code>settings</code> object?</p>
