I have searched the internet and found nothing.
This is the example of what i want:
test() {
var a = 1;
var b = a;
b = 2;
console.log(a); //I want the output is 2 and not 1
}
I know that objects and arrays are passed by reference and would solve the problem but i cant use that aproach.
I hope to have explained my problem well .