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
πŸ’¬ Discuss
βœ… Correct Answer: (A) Without var, let, or const
Explanation: Assigning a variable without var/let/const in a function makes it global (not recommended).
Explanation by: Mr. Dubey
Assigning a variable without var/let/const in a function makes it global (not recommended).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
63
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate