0
let a=['one','two'];
let b=a;
b.push('three')

console.log(a,b);

In the above program changing b's value also changes a's value, why?

Also tell me the most effective way to solve this issue.

0 Answers0