1.
What is the default scope of variables declared with the 'var' keyword in JavaScript?
2.
Which keyword allows block-scoped variable declaration?
3.
What will be the output of the following code: var x = 5; var x = 10; console.log(x);
4.
How does 'let' handle variable re-declaration in the same scope?
5.
What will be the output of the following code: let y = 10; let y = 20; console.log(y);
6.
Can you re-declare a variable using 'const' in the same scope?
7.
What will be the output of the following code: const z = 30; z = 40; console.log(z);
8.
How do 'var' declarations handle hoisting?
9.
What will be the output of the following code: console.log(a); var a = 50;
10.
Which keyword should be used by default to declare variables in modern JavaScript?