A

Admin • 833K Points
Coach

Q. Which of the following is a correct way to declare a variable in JavaScript?

  • (A) var myVar;
  • (B) int myVar;
  • (C) let: myVar;
  • (D) declare myVar;
  • Correct Answer - Option(A)
  • Views: 22
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

The correct syntax to declare a variable is using var, let, or const. 'var myVar;' is correct.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.