Where do the variables need to be declared?
Answers
Answered by
11
Answer:
Rule of thumb: variables should always be in - or as close as possible to - the scope where they are needed. Another way to phrase it is that variables should be enclosed inside the context in which they make sense and are actually useful.
Similar questions