Hello 

This is the day 28 of #30 days of javascrip coding, at this day I studied Scope – Global And Local Lesson and i learned that
1- The Scope is the concept of controlling the presence of your variables and access to them, meaning that through the Scope you will be able to control your access to the variable.
2-Because, in one way or another, it is not logical at all that all variables can be delivered from anywhere
3-Through these codes, I was able to access these variables from anywhere easily, because the Scope has Global, so it was easy to access these variables from anywhere, or even using any syntax such as loop and If. I can access them from anywhere and in any form.
4-Even from within the Function, I was able to use the variables a and b or connect them very easily, and all of this is considered the Global Scope through which I can access any variable from anywhere.
5-I created variables in the Local Scope inside the Function itself, and therefore the Console inside the Function will first search for variables in the Local Scope inside it, which does not find Local variables. It will start searching outside for Global variables, and then it can simply perform Assesses on them.
That's what I learned today and this is the codes i have typed

Comments

Popular posts from this blog