1 00:00:00,510 --> 00:00:09,500 In this video, we will learn about it and the scope of the local and global scope of that statement. 2 00:00:10,560 --> 00:00:14,010 We are already in the power created, so we just get right. 3 00:00:14,010 --> 00:00:17,820 Click nuclearised and blankety. 4 00:00:19,330 --> 00:00:26,010 So then we need to go to the advanced editor and resume it. 5 00:00:27,010 --> 00:00:35,730 So here you can see this letter and here we have to define different variables. 6 00:00:36,400 --> 00:00:40,630 So, for example, we can define here 7 00:00:43,810 --> 00:00:49,960 variable one is equal to nested let treatment. 8 00:00:51,850 --> 00:01:03,030 So it will be led and then the variable will be positively is equal to learn. 9 00:01:04,330 --> 00:01:08,460 This is the name of the variable that contain sprinklered. 10 00:01:09,370 --> 00:01:18,130 And then we have to right here in statement and the output will be a right. 11 00:01:19,220 --> 00:01:29,720 So this is one let nested let inside the outlet, and then we need to define one more little statement, 12 00:01:30,770 --> 00:01:43,820 one more variable like a variable two is equal to and then we have to define let Nessel it be is equal 13 00:01:43,820 --> 00:01:45,560 to the. 14 00:01:51,590 --> 00:02:08,270 And in the in expression, we need right to be tested and see we have variable one in the outer led 15 00:02:08,630 --> 00:02:17,660 statement and then in the initial statement, we have variable for this and for B, this. 16 00:02:19,240 --> 00:02:23,650 So if I try to get the variable, for example, be. 17 00:02:27,640 --> 00:02:30,370 And if I click, Don. 18 00:02:34,870 --> 00:02:41,380 So you will see we are getting one error, the name B was not recognized. 19 00:02:43,270 --> 00:02:47,710 So let's go to the advance editor and here you can see. 20 00:02:50,680 --> 00:03:00,340 We are here in the outlet, and when we are in the outlet, we cannot access the value, the value of 21 00:03:00,340 --> 00:03:02,960 the variable from the incorrect statement. 22 00:03:03,910 --> 00:03:10,960 So we have to write one more variable in the outlook statement 23 00:03:14,950 --> 00:03:22,000 that says variable three is equal to variable one. 24 00:03:22,850 --> 00:03:25,600 And so, no, no, we need to concatenate. 25 00:03:27,310 --> 00:03:30,250 And then there is another variable to. 26 00:03:31,590 --> 00:03:34,590 That's it, and then we have to define here. 27 00:03:36,650 --> 00:03:42,590 Here we have to write comma, and now we can use variable three. 28 00:03:46,220 --> 00:03:50,210 So they said, no, we need to done. 29 00:03:52,640 --> 00:03:59,420 So here you can see we are expecting the name variable to was not recognized so that we can see what 30 00:03:59,460 --> 00:03:59,990 the problem. 31 00:04:02,270 --> 00:04:05,670 So here you can see we have written this small letter. 32 00:04:06,470 --> 00:04:09,410 We also know it's a big variable. 33 00:04:11,050 --> 00:04:23,860 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 34 00:04:23,860 --> 00:04:27,730 Ed and here you can bite one more example. 35 00:04:28,450 --> 00:04:36,250 So here we have left is equal to one and. 36 00:04:39,260 --> 00:04:43,560 Then we have, you know, an expression and it is a 37 00:04:46,740 --> 00:04:54,720 and now we need to write another B is equal to the second variable and we need to write here one next 38 00:04:54,720 --> 00:04:54,870 year. 39 00:04:55,080 --> 00:04:55,440 Let. 40 00:05:00,100 --> 00:05:01,220 It is equal to. 41 00:05:02,820 --> 00:05:03,180 Ben. 42 00:05:04,910 --> 00:05:07,730 Or is equal to a. 43 00:05:09,400 --> 00:05:10,810 Plus one. 44 00:05:13,230 --> 00:05:15,750 And in it. 45 00:05:18,560 --> 00:05:19,790 So here you can see. 46 00:05:23,060 --> 00:05:28,100 We have here the global variables in the auklet, we have a. 47 00:05:29,420 --> 00:05:31,340 And the value of the is one. 48 00:05:32,420 --> 00:05:40,100 And here we have again the global variable B and it contained the value is equal to A plus one. 49 00:05:40,850 --> 00:05:45,410 So what is the difference between this A and this A? 50 00:05:46,930 --> 00:05:55,180 The inner letter can get the value from the chocolate, but the outlet cannot get the value from the 51 00:05:55,330 --> 00:05:56,050 inlet. 52 00:05:56,410 --> 00:05:59,840 So this is the the key that you need to remember. 53 00:06:00,730 --> 00:06:06,160 So here you can see if I try to, because here we are in the outlet. 54 00:06:06,490 --> 00:06:16,390 And if we if we execute if we try to access it, which value we will get, we can see we will get we 55 00:06:16,390 --> 00:06:17,320 should get one. 56 00:06:18,430 --> 00:06:21,340 So here you can see we are getting one. 57 00:06:21,910 --> 00:06:22,330 Right. 58 00:06:22,990 --> 00:06:25,240 And again, go to the advanced ed. 59 00:06:27,160 --> 00:06:28,660 And here you can see. 60 00:06:30,610 --> 00:06:32,140 If I write here be. 61 00:06:35,770 --> 00:06:44,850 And now the value should be possible if I write here five, then what should be the value here? 62 00:06:45,610 --> 00:06:49,960 It should because the Internet can access the value from the outlet. 63 00:06:49,990 --> 00:06:51,240 So this is. 64 00:06:52,530 --> 00:07:00,210 Will have the value five plus one and is equal a plus one, the five plus minus six, so the base should 65 00:07:00,210 --> 00:07:04,500 get when we click done so we get the value six. 66 00:07:05,370 --> 00:07:06,630 So let's click done. 67 00:07:09,950 --> 00:07:13,040 So here you can see we are getting six. 68 00:07:13,130 --> 00:07:22,760 You have understood now the local and global variable in that expression and how we can use nested lit 69 00:07:23,120 --> 00:07:29,540 because sometimes we have done some complex transformation and then we need to use that transformation 70 00:07:29,540 --> 00:07:34,480 that is stored invariably in some another key. 71 00:07:34,730 --> 00:07:41,090 So we will see this behavior, particularly with some real life example in the upcoming videos.