Test your knowledge with AI-generated quizzes on any topic
1. What is the correct way to declare a variable in JavaScript?
A) variable myVar = 5;
B) let myVar = 5;
C) declare myVar = 5;
D) myVar := 5;
Answer: B) let myVar = 5;
Explanation: 'let' is the modern way to declare variables in JavaScript.