1 00:00:01,260 --> 00:00:07,800 Welcome, everyone, to New Lecture, and today we're going to you, we're going to learn how to call 2 00:00:08,220 --> 00:00:15,160 JavaScript in our application ship there to waste so we can initiate JavaScript. 3 00:00:15,450 --> 00:00:23,670 One is I'm just going to show you so usually what you're going to find, but I need to explain you this, 4 00:00:23,670 --> 00:00:28,170 but usually what you're going to find in the production or everywhere else, the you're going to have 5 00:00:28,170 --> 00:00:30,350 here linked to a JavaScript file. 6 00:00:30,570 --> 00:00:31,830 So that's called external. 7 00:00:32,130 --> 00:00:33,810 External linking to a file. 8 00:00:33,810 --> 00:00:36,860 And the internal linking to a file is actually here. 9 00:00:36,870 --> 00:00:39,240 You're not going to be there is not going to be file here. 10 00:00:39,390 --> 00:00:39,870 Everything. 11 00:00:39,870 --> 00:00:42,860 The code will be right below the body. 12 00:00:43,500 --> 00:00:46,840 So right below the body, you're going to first start using script. 13 00:00:48,240 --> 00:00:54,930 This is how this is how you can initiate JavaScript. 14 00:00:55,170 --> 00:00:58,760 So script, I'm just going to go a little bit plus like this. 15 00:00:59,690 --> 00:01:00,360 Yeah. 16 00:01:00,390 --> 00:01:00,720 Yeah. 17 00:01:00,780 --> 00:01:01,920 Now, one more thing. 18 00:01:02,070 --> 00:01:04,340 I always use control as to save. 19 00:01:04,920 --> 00:01:09,830 So don't if you don't say you're not going to see any changes here. 20 00:01:09,870 --> 00:01:10,170 Right. 21 00:01:10,320 --> 00:01:16,740 So make sure that when I don't say there is a bubble here, like a white bubble and that is one. 22 00:01:16,740 --> 00:01:20,410 So I know that, you know, but some of you guys still don't know this. 23 00:01:20,750 --> 00:01:24,930 Now, this is called and we're going to make a comment here. 24 00:01:24,950 --> 00:01:38,430 So in HTML, you can write whatever you want, for example, here in line script call and you can select 25 00:01:38,430 --> 00:01:44,040 this one control and forward slash that will create a common. 26 00:01:44,040 --> 00:01:47,580 And if you go here, the comment will not be visible right now. 27 00:01:47,580 --> 00:01:49,330 I know that you know this, but I need to tell you. 28 00:01:49,680 --> 00:01:53,500 So the next thing that you want to do is here. 29 00:01:53,700 --> 00:01:55,150 So this is the script. 30 00:01:56,310 --> 00:01:58,970 So how do we know that this is actually working? 31 00:01:58,980 --> 00:02:05,370 So there is a one particular way to lorgnette console that log in each side. 32 00:02:05,370 --> 00:02:09,290 We are passing some arguments or variables or a string. 33 00:02:09,600 --> 00:02:15,620 So hello, world is pretty much you're going to find in every tutorial basic. 34 00:02:15,780 --> 00:02:18,900 But if you refresh here, it's a scripting language. 35 00:02:18,900 --> 00:02:21,530 It's not going to use is you're not going to be able to see it here. 36 00:02:21,960 --> 00:02:30,060 This console, the clock, you will see if you go to inspect and if you go to a console. 37 00:02:31,080 --> 00:02:34,560 Now, in order to see this, you need to go to the console. 38 00:02:34,560 --> 00:02:35,060 Here it is. 39 00:02:35,070 --> 00:02:35,820 Hello, World. 40 00:02:35,820 --> 00:02:37,050 And actually, it's not visible. 41 00:02:37,050 --> 00:02:39,290 Maybe mine, but it's there. 42 00:02:39,300 --> 00:02:45,660 I don't know if I can just make it bigger, but I can see here on the wall is there now there is a one 43 00:02:45,660 --> 00:02:47,100 more other way that you can do it. 44 00:02:47,310 --> 00:02:49,110 So I'm just going to comment now. 45 00:02:50,040 --> 00:02:58,350 I'm going to show you how to make a comments here in in how to say in JavaScript. 46 00:02:58,560 --> 00:03:00,600 So there is a single line Commins. 47 00:03:00,900 --> 00:03:08,730 So double forward slash and say, OK, this is single line comments in same as in HTML. 48 00:03:08,730 --> 00:03:10,140 It's not going to be visible here. 49 00:03:10,470 --> 00:03:11,940 You're not going to be able to see it. 50 00:03:12,360 --> 00:03:18,840 Now if you want to make more comments like a one, two, three comments, because here if I press enter 51 00:03:18,840 --> 00:03:21,810 and if you start typing, it's not considered as a comment. 52 00:03:21,810 --> 00:03:30,390 So if you want to multiple comments, the other way is to do forward slash star and star forward slash. 53 00:03:30,390 --> 00:03:33,480 So that means opening and closing. 54 00:03:33,480 --> 00:03:40,440 See, this one is backwards and the other one here, you're making multiple comments, comments. 55 00:03:40,470 --> 00:03:41,220 This is how you make. 56 00:03:41,220 --> 00:03:48,840 So for example, one, this is in line script call. 57 00:03:49,710 --> 00:03:58,470 Now second comments will not be visible, will not be rendered. 58 00:03:58,500 --> 00:04:01,620 Now if you remember, if you refresh this, nothing will change. 59 00:04:01,770 --> 00:04:03,810 So now you know how to do it. 60 00:04:03,810 --> 00:04:05,550 Comments, you know how to do. 61 00:04:05,700 --> 00:04:07,350 Actually, this is outside the script. 62 00:04:07,350 --> 00:04:09,420 So it's a not the same comment here. 63 00:04:09,690 --> 00:04:11,750 So I'm just going to I'm going to leave it like that. 64 00:04:11,910 --> 00:04:13,350 So this is a single line comment. 65 00:04:14,880 --> 00:04:16,170 I'm just going to make it like this. 66 00:04:18,000 --> 00:04:20,940 This is a single line comment. 67 00:04:21,360 --> 00:04:29,580 And this is a multiple these are multiple comments right now. 68 00:04:29,730 --> 00:04:30,570 You know how to do it. 69 00:04:32,820 --> 00:04:35,550 So this is the inline way of calling JavaScript. 70 00:04:35,700 --> 00:04:40,650 Now, one more thing that I'm just going to create a file here and I say, OK, scripts. 71 00:04:42,460 --> 00:04:48,670 That is so remember, you need to put these jazz extension in order to put it here, and I'm going to 72 00:04:48,670 --> 00:04:52,100 copy this one here and I'm going to put it there. 73 00:04:52,720 --> 00:05:00,550 Hello, world from external JavaScript file. 74 00:05:01,240 --> 00:05:02,920 This is how the world from external. 75 00:05:02,920 --> 00:05:05,910 And if I do it like this, you will not be able to see it. 76 00:05:05,920 --> 00:05:06,370 Why? 77 00:05:06,610 --> 00:05:14,170 Because this JavaScript file is here, but it's never been called here in the HTML. 78 00:05:14,470 --> 00:05:16,100 Now how we can do it. 79 00:05:16,660 --> 00:05:17,470 Remember that. 80 00:05:18,340 --> 00:05:19,690 Actually, I don't have it here. 81 00:05:20,140 --> 00:05:28,000 Remember that when we doing a success, we are calling a Sears's files here on top in the head so we 82 00:05:28,000 --> 00:05:32,710 can do that in the below the body and we can do the same thing here. 83 00:05:32,800 --> 00:05:40,240 Now, I'm just going to call scrip sirc means for source equal in I. 84 00:05:42,150 --> 00:05:46,200 Need to select script, that is Eve, and you need to close it as well. 85 00:05:46,230 --> 00:05:50,640 This is what I mean, because it's closed now scripts. 86 00:05:50,980 --> 00:05:52,300 James is this file. 87 00:05:52,590 --> 00:05:56,790 So if I save it first, I will be able to sit this in. 88 00:05:57,000 --> 00:06:00,120 Then I will be able to see what's inside this file. 89 00:06:00,200 --> 00:06:02,070 Now, here it is. 90 00:06:03,690 --> 00:06:05,600 One more thing about the comments. 91 00:06:05,640 --> 00:06:09,500 You can also use the comments to comment this part. 92 00:06:09,510 --> 00:06:11,430 So control and forward slash. 93 00:06:11,790 --> 00:06:15,870 And now, although this one is called first, there is nothing inside. 94 00:06:15,870 --> 00:06:17,490 Actually, it's going to be printing this one. 95 00:06:18,230 --> 00:06:18,690 Yeah. 96 00:06:18,720 --> 00:06:26,460 One more thing in production, you're going to see folder here called Jase's sorry, in a folder here 97 00:06:26,460 --> 00:06:28,380 called The Xerces. 98 00:06:28,500 --> 00:06:30,480 Now, don't mind about my icons here. 99 00:06:30,480 --> 00:06:35,400 I'm not going to be able to see it because I have used extensions in mine. 100 00:06:35,400 --> 00:06:45,300 Extensions are pretty much here, so I'm going to show you my extensions and you can go one by one. 101 00:06:45,600 --> 00:06:49,920 Download all of these extensions and material I can team. 102 00:06:49,930 --> 00:06:51,390 That's why you see the icons. 103 00:06:51,750 --> 00:06:56,670 So Rainbow brackets, code, stuff like that. 104 00:06:56,680 --> 00:06:58,790 Now self out the closed stack. 105 00:06:58,800 --> 00:07:01,120 That's why you see that this one is self-closing. 106 00:07:01,860 --> 00:07:05,100 Now I use now all often. 107 00:07:05,430 --> 00:07:11,310 So when you find out that, for example, debugger for Chrome, you go there and install it. 108 00:07:11,310 --> 00:07:17,460 And after that maybe you need to be too close to this one and to initiate again, I mean, to close 109 00:07:17,460 --> 00:07:18,140 the bioscope. 110 00:07:18,690 --> 00:07:19,180 That's it. 111 00:07:19,860 --> 00:07:21,110 This is my taxi. 112 00:07:21,300 --> 00:07:23,550 This is my extensions that I have. 113 00:07:23,850 --> 00:07:26,510 And this is the extension marketplace where you can find them. 114 00:07:27,000 --> 00:07:27,640 Very cool. 115 00:07:27,660 --> 00:07:32,770 Now, you professionally know a lot of things, guys, so I'm calling this one. 116 00:07:33,090 --> 00:07:34,740 Make sure that you do the same thing. 117 00:07:35,550 --> 00:07:42,510 And from now, what I'm going to do, I'm going to move this one into Jane's folder and it's going to 118 00:07:42,510 --> 00:07:43,200 ask me. 119 00:07:43,200 --> 00:07:44,260 I'm just going to say move. 120 00:07:44,700 --> 00:07:46,500 So this is inside your folder. 121 00:07:46,510 --> 00:07:48,090 Now, look what's happening. 122 00:07:48,300 --> 00:07:55,200 So if I see loading field for the screen, the source HDTV localhost. 123 00:07:55,200 --> 00:07:55,680 Right. 124 00:07:55,800 --> 00:07:58,170 Genius intro script, dodgiest. 125 00:07:58,590 --> 00:07:59,520 It's not there. 126 00:07:59,640 --> 00:07:59,780 Why? 127 00:07:59,850 --> 00:08:07,440 It's not there because before I was in the same level with index that HDMI out now it's not in the same 128 00:08:07,440 --> 00:08:07,680 level. 129 00:08:07,830 --> 00:08:11,550 So how we can do that so we can just skip this one. 130 00:08:11,550 --> 00:08:16,860 So dot forward slash and it will give me option to go to different directories. 131 00:08:17,040 --> 00:08:24,840 So if I, so I'm just going to remove this one in order to see that forward slash and you say is now 132 00:08:24,840 --> 00:08:29,850 forward slash again in its finding the script inside and you put a script. 133 00:08:30,360 --> 00:08:36,720 Now this one is out to I don't know, what's the name of this one either closed or out of finding. 134 00:08:36,720 --> 00:08:39,210 So yeah, that's why it's finding me like this. 135 00:08:39,540 --> 00:08:40,000 Yeah. 136 00:08:40,010 --> 00:08:43,350 I've done have a lot of this one, but you don't need it actually. 137 00:08:43,620 --> 00:08:45,930 So this is the part you want to see it. 138 00:08:46,950 --> 00:08:53,760 And now if you refresh it, heal the world from external file for it from external JS here. 139 00:08:53,760 --> 00:08:56,720 It's here now that's better. 140 00:08:56,940 --> 00:08:59,400 So that is pretty much it now. 141 00:08:59,400 --> 00:09:01,830 Your master of JavaScript. 142 00:09:01,860 --> 00:09:02,670 No I'm just joking. 143 00:09:02,850 --> 00:09:10,610 We just started so you know how to call inline in external JS into the project. 144 00:09:10,830 --> 00:09:11,520 Very good. 145 00:09:11,940 --> 00:09:16,920 Second thing that you know how to do a Commins if you do a common it's not going to be loaded even here. 146 00:09:17,550 --> 00:09:28,590 So you can put a comment here and say, OK, if I can type it external jayasekara, that's pretty much 147 00:09:28,590 --> 00:09:28,800 it. 148 00:09:28,920 --> 00:09:31,000 Now you can make a comment in the next lecture. 149 00:09:31,020 --> 00:09:32,370 We're going to do something very interesting. 150 00:09:32,370 --> 00:09:33,150 So stay tuned. 151 00:09:34,230 --> 00:09:38,720 Watch the previous lecture, what's the what's the next lecture and enjoy the content. 152 00:09:38,940 --> 00:09:39,690 Thank you very much. 153 00:09:39,690 --> 00:09:41,700 I hope you hope you enjoyed this one. 154 00:09:41,700 --> 00:09:43,020 And I will see you in the next one.