One of the key goals of this course was to be able to make better decisions about our code, using our knowledge of scope and context. So in doing that, there's probably a couple of questions that might come to mind first, for example, when should I leverage scope? And when should I leverage context? Well, before you can really answer those questions, we need to think about a more important question, which is, what is the problem you're trying to solve? As you play in your code at any given moment? What is the issue run into or what?
What are you trying to achieve? And probably you're going to be trying to solve problems that relate to you know, the kind of things we learned in these great books that we read antipatterns things like repetitive code or hard coded values or bloated functions. These are just examples of the kinds of problems that we don't want to run into as you plan on our code. So at any given moment, once your clear about the problem you're trying to solve. Then you can go about answering the next question, which is, what is the right tool for this job. And, of course, there are many different types of tools.
There's tools for each job. But you need to figure out what the right tool is for the job you have at hand. And once you've chosen the right tool, then you can start planning out your code and deciding Should I leverage scope or should every context for this particular problem so let's take a step further and actually look at some code examples to to really kind of understand what this means.