JavaScript Variables Quiz

1. What keyword lets you create a changeable variable?

2. Which keyword creates a variable that cannot change?

3. Which keyword is used in old JavaScript?

4. What value does var have before setting it?

5. What happens if you use let before declaring it?

6. Which keyword stays inside a block?

7. Which keyword ignores block scope?

8. Which keyword is best for fixed values?

9. Which variable can change?

10. Which variable must have a value when created?

11. Which keyword should be avoided?

12. What happens if you redeclare let?

13. What happens if you assign without var/let/const?

14. Which variable shows undefined before setting?

15. Which variables throw ReferenceError before setting?

16. Which becomes part of window object?

17. Which is best for loop counters?

18. Which keyword allows shadowing?

19. Which keyword was added in ES6?

20. Which variable is safest for beginners?

Leave a Reply

Your email address will not be published. Required fields are marked *