1 00:00:00,570 --> 00:00:01,620 Hello and welcome. 2 00:00:01,650 --> 00:00:11,190 In this video I'm going to illustrate with some basic examples what output means in programming. 3 00:00:11,190 --> 00:00:24,230 What is an output an output is basically anything that comes out of a computer after it has been processed. 4 00:00:24,270 --> 00:00:30,690 So a typical example would be this slide you're looking at on the screen. 5 00:00:30,690 --> 00:00:39,810 The monitor is an example of an output device that is used to output text on the screen. 6 00:00:39,810 --> 00:00:52,330 To illustrate I want you to open up your Web browser and typing in the address bar about call on blank. 7 00:00:52,650 --> 00:00:57,270 And that will give you the blank page. 8 00:00:57,270 --> 00:01:06,780 Once you open up the blank page just right click anywhere and click on inspect and click on console 9 00:01:07,840 --> 00:01:16,040 and this console area here is where we are going to do some experimentation with output. 10 00:01:16,120 --> 00:01:26,440 So I'm going to use some built in commands of functions that are built in to JavaScript functions are 11 00:01:27,260 --> 00:01:33,040 bunch of code or computer statements that do specific things. 12 00:01:33,040 --> 00:01:39,030 So the functions are already being built in and they're baked into the javascript programming language. 13 00:01:39,040 --> 00:01:42,310 We just have to call them to use them. 14 00:01:42,310 --> 00:01:43,750 So the first thing I wanted to. 15 00:01:43,750 --> 00:01:50,270 I want to display an output here inside this area here. 16 00:01:50,410 --> 00:01:53,560 I want to write a message. 17 00:01:53,570 --> 00:01:59,710 So to do that I'm going to use a command so so known as a function code the document 18 00:02:02,450 --> 00:02:04,740 dot right. 19 00:02:07,930 --> 00:02:16,720 And inside the parentheses is where you specify the message that you want to be displayed on the screen. 20 00:02:17,620 --> 00:02:21,060 So I want the message to be big. 21 00:02:21,580 --> 00:02:31,660 So I'm going to use on page one element within which is and hasty AML head in tag. 22 00:02:32,080 --> 00:02:33,110 So I'm going to. 23 00:02:33,130 --> 00:02:33,730 Hello 24 00:02:37,090 --> 00:02:39,310 world. 25 00:02:40,750 --> 00:02:44,050 Exclamation mark. 26 00:02:44,050 --> 00:02:48,280 And close the hate one tag. 27 00:02:50,040 --> 00:02:52,330 All right. 28 00:02:52,330 --> 00:02:59,850 And that end that close the parentheses and pull the semicolon. 29 00:02:59,860 --> 00:03:04,400 So this here is a complete statement in javascript. 30 00:03:04,780 --> 00:03:13,840 So what I'm saying here this right here is a method in all a function that basically is going to write 31 00:03:14,170 --> 00:03:17,150 this message here to the current document. 32 00:03:17,170 --> 00:03:19,960 This here is a current document. 33 00:03:19,960 --> 00:03:24,670 So he's going to print out this message Hello World. 34 00:03:24,700 --> 00:03:31,210 The reason I'm calling in closing quotes is because they are texts so you need to enclose text in quotes 35 00:03:31,270 --> 00:03:33,640 so they referred to as a string. 36 00:03:33,640 --> 00:03:38,380 So if I press enter now it will display in this area. 37 00:03:38,800 --> 00:03:39,640 Hello world. 38 00:03:39,670 --> 00:03:41,980 So let me do that. 39 00:03:42,100 --> 00:03:47,690 So this here is an output it's regarded as an output. 40 00:03:47,740 --> 00:03:56,450 So because a computer has taken used this method here this command and printed this text on the screen. 41 00:03:56,470 --> 00:04:03,520 So this is an output from this action the computer all the program took. 42 00:04:03,520 --> 00:04:04,960 Let's try another command. 43 00:04:04,960 --> 00:04:14,320 This is another command also it's called an alert is used to display pop up messages on the screen. 44 00:04:14,380 --> 00:04:17,830 So let me do a simple maths. 45 00:04:17,830 --> 00:04:24,830 How do seven plus eight. 46 00:04:25,000 --> 00:04:32,590 You always have to end the semicolon code that indicates that this is a complete statement on this statement 47 00:04:32,660 --> 00:04:41,140 and to hear what there is to this alert is he said built in function in javascript is used to display 48 00:04:41,470 --> 00:04:43,440 pop up messages. 49 00:04:43,540 --> 00:04:51,130 So if I press enter it will give me an output displayed in a pop up message to give me the result of 50 00:04:51,130 --> 00:04:51,730 this too. 51 00:04:51,730 --> 00:04:53,370 So I press enter. 52 00:04:53,520 --> 00:04:58,240 You can see he is giving me the output of 15. 53 00:04:58,240 --> 00:05:04,030 So he's done this is done the calculation and generated an output which is 15. 54 00:05:04,030 --> 00:05:11,860 So this here is known as an alert pop up box so that again is another example of an output. 55 00:05:11,860 --> 00:05:16,590 I can do one more I can display a message here in the console. 56 00:05:16,780 --> 00:05:21,490 This area here is a console so I can do console lock. 57 00:05:21,520 --> 00:05:33,790 This is another method or another function console log and inside the parentheses I can display a message 58 00:05:33,880 --> 00:05:34,990 I can say 59 00:05:37,960 --> 00:05:48,270 let's just do a simple message I just say yo OK I do surrounded by quotes because it's a text. 60 00:05:48,520 --> 00:05:48,940 OK. 61 00:05:48,940 --> 00:05:57,580 You always have to enclose text in either single quotes or double code but you can mix the quotes. 62 00:05:57,580 --> 00:06:02,460 You can't have a single code here and then a double code here the quotes must match. 63 00:06:02,500 --> 00:06:11,020 So if I press enter you print out you on the console you can see here it's printed out you on the console 64 00:06:11,020 --> 00:06:11,380 to. 65 00:06:11,380 --> 00:06:13,570 This is an output. 66 00:06:13,570 --> 00:06:14,770 This here is an output. 67 00:06:14,770 --> 00:06:26,320 So thus some basic examples of outputs and output is basically the outcome of the results that you've 68 00:06:26,380 --> 00:06:27,730 asked the computer to do. 69 00:06:27,730 --> 00:06:29,850 So you tell the computer to do something. 70 00:06:29,860 --> 00:06:33,460 He's done it and then it gives you back the results. 71 00:06:33,490 --> 00:06:37,410 So it is a result that is known as the output. 72 00:06:37,480 --> 00:06:47,380 I hope this video has helped to make you understand what a output or an output is in computer programming. 73 00:06:47,950 --> 00:06:49,240 Thank you for watching. 74 00:06:49,240 --> 00:06:49,900 Bye for now.