Answer & Solution
Answer: Option B
Solution:
In modern JavaScript, 'let' and 'const' are preferred over 'var' due to block scoping and better variable management. 'var' is function-scoped, while 'let' and 'const' are block-scoped, making them safer and more predictable in terms of variable scope. Therefore, option B is the correct way to declare a variable 'x' with an initial value of 10.