Почему цикл перезаписывает значение пременной b?
Ведь я с ней не произвожу никаких действий!
let a = []
let b = ['a', 'b', 'c'];
let c = [1, 2, 3];
function f11() {
let out = document.querySelector('.out-11');
let f = b;
for (let i = 0; i < c.length; i++) {
f.push(c[i]);
console.log(b);
}
}
document.querySelector('.b-11').onclick = f11;
https://codepen.io/konstantinopol/pen/abGGNgr