const mean in JavaScript?const declares a variable that cannot be reassigned after its initial value is set.
const variable after it is declared?No, you cannot reassign a new value to a const variable once it is declared.
const variable without initializing it?No, const variables must be initialized when declared.
const make objects or arrays immutable?No, const prevents reassignment of the variable, but the contents of objects or arrays can still be changed.
Example: What will happen if you run this code?<br><pre>const x = 5;<br>x = 10;</pre>This will cause an error because x is declared with const and cannot be reassigned.
const variable?Reassigning a const variable causes a TypeError in JavaScript.
const variable without giving it a value?const variables must be initialized when declared.
const and objects?const prevents reassignment but object properties can be changed.
const declares variables that cannot be reassigned.
const name = 'Alice';
console.log(name);
The code outputs the string 'Alice' because name is initialized with that value.
const works for variable declaration in JavaScript.const and let in JavaScript.