Multiple choice

How do you declare a JavaScript variable?

  1. variable carName;

  2. v carName;

  3. var carName;

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JavaScript, variables are declared using the 'var', 'let', or 'const' keywords. 'var' is the traditional method.