1//Normal variable, No.
2function square(x) {
3 x = x * x;
4 return x;
5}
6var y = 10;
7var result = square(y);
8console.log(y); // 10 -- no change
9console.log(result); // 100
10
11//Objects like struct sub variables, Yes.
12function turnOn(machine) {
13 machine.isOn = true;
14}
15
16var computer = {
17 isOn: false
18};
19
20turnOn(computer);
21console.log(computer.isOn); // true;