In this video, we will learn about it and the scope of the local and global scope of that statement.
We are already in the power created, so we just get right.
Click nuclearised and blankety.
So then we need to go to the advanced editor and resume it.
So here you can see this letter and here we have to define different variables.
So, for example, we can define here
variable one is equal to nested let treatment.
So it will be led and then the variable will be positively is equal to learn.
This is the name of the variable that contain sprinklered.
And then we have to right here in statement and the output will be a right.
So this is one let nested let inside the outlet, and then we need to define one more little statement,
one more variable like a variable two is equal to and then we have to define let Nessel it be is equal
to the.
And in the in expression, we need right to be tested and see we have variable one in the outer led
statement and then in the initial statement, we have variable for this and for B, this.
So if I try to get the variable, for example, be.
And if I click, Don.
So you will see we are getting one error, the name B was not recognized.
So let's go to the advance editor and here you can see.
We are here in the outlet, and when we are in the outlet, we cannot access the value, the value of
the variable from the incorrect statement.
So we have to write one more variable in the outlook statement
that says variable three is equal to variable one.
And so, no, no, we need to concatenate.
And then there is another variable to.
That's it, and then we have to define here.
Here we have to write comma, and now we can use variable three.
So they said, no, we need to done.
So here you can see we are expecting the name variable to was not recognized so that we can see what
the problem.
So here you can see we have written this small letter.
We also know it's a big variable.
Are to get it done so he can see we are getting the output is lab space ducks, so let's go to the advanced
Ed and here you can bite one more example.
So here we have left is equal to one and.
Then we have, you know, an expression and it is a
and now we need to write another B is equal to the second variable and we need to write here one next
year.
Let.
It is equal to.
Ben.
Or is equal to a.
Plus one.
And in it.
So here you can see.
We have here the global variables in the auklet, we have a.
And the value of the is one.
And here we have again the global variable B and it contained the value is equal to A plus one.
So what is the difference between this A and this A?
The inner letter can get the value from the chocolate, but the outlet cannot get the value from the
inlet.
So this is the the key that you need to remember.
So here you can see if I try to, because here we are in the outlet.
And if we if we execute if we try to access it, which value we will get, we can see we will get we
should get one.
So here you can see we are getting one.
Right.
And again, go to the advanced ed.
And here you can see.
If I write here be.
And now the value should be possible if I write here five, then what should be the value here?
It should because the Internet can access the value from the outlet.
So this is.
Will have the value five plus one and is equal a plus one, the five plus minus six, so the base should
get when we click done so we get the value six.
So let's click done.
So here you can see we are getting six.
You have understood now the local and global variable in that expression and how we can use nested lit
because sometimes we have done some complex transformation and then we need to use that transformation
that is stored invariably in some another key.
So we will see this behavior, particularly with some real life example in the upcoming videos.