I am new to JS, and JS syntax is definitely confusing to me as I'm used to other languages instead.
const x = 5;
x.yy = 3;
console.log(x.yy); // undefined
How is x.yy = 3;
a valid syntax?
and why is x.yy
undefined when x.yy =3;
took in place?