1 00:00:00,510 --> 00:00:01,960 Hello and welcome. 2 00:00:01,960 --> 00:00:07,170 In this video I'm going to introduce you to see it says comments. 3 00:00:07,320 --> 00:00:12,560 Comments are used to explain your code. 4 00:00:12,870 --> 00:00:20,300 They can also help you to edit your source code at a later date. 5 00:00:20,310 --> 00:00:24,480 Comments are ignored by the web browser. 6 00:00:24,480 --> 00:00:32,200 So if you've got comments in your code when the web browser loads the page it completely ignores comments. 7 00:00:32,440 --> 00:00:38,900 You can use single line comments or multiple line comments. 8 00:00:39,030 --> 00:00:42,850 So I've got my Sears says file open. 9 00:00:43,290 --> 00:00:53,730 So the way you can see it come in for example if you wanted to insert a single line comment or you need 10 00:00:53,730 --> 00:00:58,510 to do is just do slash. 11 00:00:59,930 --> 00:01:12,220 And Asterix and then be text you want to add to the comment so I would just say this makes 12 00:01:14,500 --> 00:01:16,320 text. 13 00:01:17,140 --> 00:01:18,510 Hey tallack. 14 00:01:19,910 --> 00:01:29,470 And another asterisks and then a forward slash so we can see if it's ignored by the web browser. 15 00:01:29,470 --> 00:01:38,750 So you do force flash as Terry X the text you want to write and then esoterics and then you close it 16 00:01:38,750 --> 00:01:40,740 with another forward slash. 17 00:01:40,820 --> 00:01:44,310 So this is known as a single line comment. 18 00:01:44,510 --> 00:01:46,330 So you can have it positioned anywhere. 19 00:01:46,400 --> 00:01:53,150 I can have it there or I can decide to move it and placed it. 20 00:01:53,240 --> 00:01:57,820 Place it on the side here somewhere here. 21 00:01:57,890 --> 00:02:04,340 It will not affect the code because it can be right in the wall is going to affect the chord. 22 00:02:04,400 --> 00:02:12,830 If I move this beginning to the beginning near the end in here then it will affect that call you can 23 00:02:12,830 --> 00:02:13,550 see this code. 24 00:02:13,550 --> 00:02:15,110 Here is italic. 25 00:02:15,110 --> 00:02:23,860 If I decide to move this for example if I am testing something I want to use check for different things. 26 00:02:23,870 --> 00:02:30,980 It can see now the italics has gone because I've commented that the entire quote but I can just get 27 00:02:30,980 --> 00:02:38,180 rid of that bit and just position the comment here. 28 00:02:38,180 --> 00:02:42,700 Just buy the property and the property value. 29 00:02:42,710 --> 00:02:47,530 That way doesn't affect the tool element that has been stalled. 30 00:02:47,570 --> 00:02:51,610 So that is called a single line comment. 31 00:02:51,860 --> 00:02:59,630 So we can use it to describe various parts of your CNS to yourself or to others who may want to look 32 00:02:59,630 --> 00:03:01,940 at your thesis at a later date. 33 00:03:01,990 --> 00:03:12,050 So if you want to add more to Paul Like Comment or you need to do you to the asterisks and then you 34 00:03:12,050 --> 00:03:15,510 do the Asterix again. 35 00:03:15,830 --> 00:03:27,820 In between you just typing your text just see this is a more t ball line 36 00:03:30,350 --> 00:03:32,190 comment. 37 00:03:32,510 --> 00:03:39,950 All right so for example here if I wanted to comment out comments about this entire block of code I 38 00:03:39,950 --> 00:03:52,580 just come here maybe just grab my thesis put that all in one there and grab this one and put it here. 39 00:03:52,820 --> 00:03:53,710 Completely. 40 00:03:53,750 --> 00:03:59,930 Comment out that block of code you can see the effect is affected. 41 00:04:00,310 --> 00:04:07,580 The element that I'm styling because I've commented that that block Alright so that's how you add or 42 00:04:07,580 --> 00:04:14,800 use more t'pau line comment if you want to comment have multiple lines of code. 43 00:04:14,960 --> 00:04:16,880 You can do it that way. 44 00:04:17,480 --> 00:04:23,530 So that's basically on using theses comments they can come in handy. 45 00:04:23,540 --> 00:04:25,830 I recommend you use them. 46 00:04:25,940 --> 00:04:33,210 The earlier you start adopting that practice the easier it would be in the long run. 47 00:04:33,260 --> 00:04:34,400 You get used to it. 48 00:04:34,420 --> 00:04:41,060 Just comment out bits and pieces of code anything you don't understand or you know if you understand 49 00:04:41,060 --> 00:04:47,420 it you may understand it when you write in the code but maybe six months down the line you may come 50 00:04:47,420 --> 00:04:48,240 back to your code. 51 00:04:48,280 --> 00:04:50,560 I may not know what some things mean. 52 00:04:50,870 --> 00:04:55,970 So commenting your code is very useful thinking. 53 00:04:56,130 --> 00:04:57,290 And bye for now.