Okta Interview Question

Correct the code: (Similar to this) const x = 12; x = 11; console.log(x);

Interview Answer

Anonymous

Oct 17, 2024

x is a constant so it cannot be given a new value: let x = 12; x = 11; console.log(x);