11.
Which of the following will cause an error?
12.
What will be the output of the following code?
let a = 1; let b = 2; let c = a + b; console.log(c);
13.
Which statement is true about variables in JavaScript?
14.
What will be the output of the following code?
var a = 1; { var a = 2; } console.log(a);
15.
Which of the following is correct about variable scope in JavaScript?
16.
What is the difference between let and var?
17.
What will be the output of the following code?
const a = 10; a = 20; console.log(a);
18.
Can you reassign a value to a variable declared with let?
19.
What will be the output of the following code?
console.log(a); var a = 10;
20.
Which of the following is true about variable naming conventions in JavaScript?