A

Admin • 828.03K Points
Coach

Q. How can you declare a variable globally inside a function?

  • (A) Without var, let, or const
  • (B) Using const
  • (C) Using let
  • (D) Using global
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
Assigning a variable without var/let/const in a function makes it global (not recommended).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.