1 00:00:00,630 --> 00:00:02,170 Hello and welcome. 2 00:00:02,310 --> 00:00:09,030 In this video I will explain what a syntax is. 3 00:00:09,030 --> 00:00:13,750 What is a syntax in programming language. 4 00:00:13,800 --> 00:00:28,260 A syntax basically refers to the vocabulary and grammar that is used to construct a program just like 5 00:00:28,680 --> 00:00:30,520 with the English language. 6 00:00:30,570 --> 00:00:40,440 You have to create valid sentences using words and punctuation as in programming the syntax is a set 7 00:00:40,440 --> 00:00:45,140 of rules that guides you in doing that. 8 00:00:45,210 --> 00:00:54,360 So these set of rules all guide you as to how you construct your computer programs. 9 00:00:54,360 --> 00:01:05,070 Now every programming language has its own syntax just like American English is different in some aspects 10 00:01:05,430 --> 00:01:08,430 to British English. 11 00:01:08,430 --> 00:01:17,160 So the syntax is basically a bunch of rules that enables you to construct a valid format. 12 00:01:17,160 --> 00:01:26,390 And this also includes a combination of instructions that you use in putting the program together. 13 00:01:26,400 --> 00:01:32,300 So let me show you a basic example of a javascript syntax. 14 00:01:32,400 --> 00:01:37,190 So this is a javascript syntax is just a basic one. 15 00:01:37,290 --> 00:01:41,480 And in this example here we've got some key words here. 16 00:01:41,580 --> 00:01:46,400 This word far is basically known as a variable. 17 00:01:46,410 --> 00:01:49,140 It is used as a storage container. 18 00:01:49,590 --> 00:01:57,990 So in this example here I've got a variable called first number and I'm using the equals two to assign 19 00:01:57,990 --> 00:02:00,150 it the value of seven to. 20 00:02:00,160 --> 00:02:05,550 That means is that these values 7 is going to be stored in this container called first number. 21 00:02:06,090 --> 00:02:13,320 And here on column Value 8 which is going to be stored in this container called second number. 22 00:02:13,380 --> 00:02:24,450 So the the number first numbers second no names that I've given to this keyword variable v a VAR is 23 00:02:24,480 --> 00:02:33,930 a key word I'm part of the javascript programming language is its syntax a component of P javascript 24 00:02:34,110 --> 00:02:40,330 programming language equals to here is known as an assignment operator. 25 00:02:40,860 --> 00:02:42,950 It's also part of the syntax. 26 00:02:42,990 --> 00:02:46,000 It is used to assign a value. 27 00:02:46,020 --> 00:02:54,510 So whenever you see this equals to sign in a syntax in a programming syntax is basically referring to 28 00:02:54,510 --> 00:03:01,260 is using that to assign the value is an instruction to assign its support. 29 00:03:01,260 --> 00:03:07,200 This is basically seen is a put those values seven inside this box called first number. 30 00:03:07,200 --> 00:03:11,220 Put this value get inside this box called second number. 31 00:03:11,220 --> 00:03:18,420 So this equals two is an assignment operator is known as an assignment operator in some programming 32 00:03:18,420 --> 00:03:19,530 language. 33 00:03:19,560 --> 00:03:26,730 You don't necessarily have to put a semicolon after you've declared something in JavaScript. 34 00:03:26,730 --> 00:03:34,410 You do once you declare a variable in JavaScript you need to put a semicolon that is part of the javascript 35 00:03:34,590 --> 00:03:35,800 syntax. 36 00:03:35,880 --> 00:03:44,220 So every programming language has its own way of doing things which is referred to as a syntax. 37 00:03:44,220 --> 00:03:53,580 So the key thing to take away or you see the word syntax is referring to a programming language is vocabulary 38 00:03:53,730 --> 00:03:54,420 and grammar. 39 00:03:54,450 --> 00:04:04,700 Basically what this means is basically a set of rules of how your programs are constructed. 40 00:04:04,710 --> 00:04:07,020 Thanks for watching and bye for now.