In JavaScript, which of the following is not a valid way to declare a variable?

preview_player
Показать описание
Option C is the correct answer.

Explanation:

In JavaScript, variable declarations using let, const, or var are valid, but the syntax in option C is not valid for declaring a variable. The correct syntax for declaring a variable using var, let, or const is to specify the variable name (e.g., x, y, or z) without the word "variable."

So, the correct way to declare a variable is let x = 5;, const y = 10;, or var w = 20;.
Рекомендации по теме
welcome to shbcf.ru