I am very new to javascript, and I would like to do something very simple, but I can't manage to. Here is my code globally:
var Test = class Test
{
constructor(var_x, var_y) {
this.x = var_x;
this.y = var_y;
} };
and
var y = {Value: 2};
var test1 = new Test(0, y.Value);
y.Value +=2;
console.log(test1);
my problem is that I display (0,2), and as I incremented y.Value, I expected (0,4). What did I miss ? Thank you!