1.
What is the global object in a browser environment?
2.
Which keyword is used to declare a variable in the global scope?
3.
How do you declare a global variable inside a function?
4.
What will be the output of console.log(window.myVar); if var myVar = 'Hello'; is declared outside any function?
5.
Can a global variable be accessed inside a function?
6.
What is the output of console.log(window.globalLet); if let globalLet = 'Hello'; is declared in the global scope?
7.
What happens if you declare a variable without var, let, or const inside a function?
8.
Which statement is true about global variables in JavaScript?
9.
What is the output of console.log(globalVar); if globalVar = 'Hello'; is assigned inside a function without using var, let, or const?
10.
Can global variables lead to name collisions in large codebases?