If I have variable x=10 and x=12;
and I passed a parameter function value(num);
and passed an argument .... value(x); to the parameter.
how does the execution works .. will the compiler checks 10<12 or directly implements 12 is the x value in the argument.
As mentioned in comments. There can't be two variables with the same name and different values in the same scope. The latest assigned value will be used:
(() => {
let x = 10;
x= 12
console.info(x);
})();
output : 12