Easy
Understanding JavaScript Pass by Value: Why Variables Remain Unchanged in Functions
What will this code output and why?
1let x = 10;23function modifyValue(input) {4 input = 20;5}67modifyValue(x);8console.log(x);
What will this code output and why?
1let x = 10;23function modifyValue(input) {4 input = 20;5}67modifyValue(x);8console.log(x);