is const only for the lifetime of the function javascript? code example
Example: const js +=
const foo; // Errror as const cannot be kept un-initialized;
const foo = "foo";
console.log(foo); //Output: foo
foo += " bar"; //Error
const foo; // Errror as const cannot be kept un-initialized;
const foo = "foo";
console.log(foo); //Output: foo
foo += " bar"; //Error