If global variables may be used everywhere in the program, why not make all variables global instead of only global inside specific contexts? Defend your response

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter9: Getting Started With Javascript: Creating A Countdown Clock
Section9.3: Visual Overview: Javascript Functions And Expressions
Problem 7QC
icon
Related questions
Question

If global variables may be used everywhere in the program, why not make all variables global instead of only global inside specific contexts?
Defend your response.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning