Hello and welcome.
In this video I will explain what a syntax is.
What is a syntax in programming language.
A syntax basically refers to the vocabulary and grammar that is used to construct a program just like
with the English language.
You have to create valid sentences using words and punctuation as in programming the syntax is a set
of rules that guides you in doing that.
So these set of rules all guide you as to how you construct your computer programs.
Now every programming language has its own syntax just like American English is different in some aspects
to British English.
So the syntax is basically a bunch of rules that enables you to construct a valid format.
And this also includes a combination of instructions that you use in putting the program together.
So let me show you a basic example of a javascript syntax.
So this is a javascript syntax is just a basic one.
And in this example here we've got some key words here.
This word far is basically known as a variable.
It is used as a storage container.
So in this example here I've got a variable called first number and I'm using the equals two to assign
it the value of seven to.
That means is that these values 7 is going to be stored in this container called first number.
And here on column Value 8 which is going to be stored in this container called second number.
So the the number first numbers second no names that I've given to this keyword variable v a VAR is
a key word I'm part of the javascript programming language is its syntax a component of P javascript
programming language equals to here is known as an assignment operator.
It's also part of the syntax.
It is used to assign a value.
So whenever you see this equals to sign in a syntax in a programming syntax is basically referring to
is using that to assign the value is an instruction to assign its support.
This is basically seen is a put those values seven inside this box called first number.
Put this value get inside this box called second number.
So this equals two is an assignment operator is known as an assignment operator in some programming
language.
You don't necessarily have to put a semicolon after you've declared something in JavaScript.
You do once you declare a variable in JavaScript you need to put a semicolon that is part of the javascript
syntax.
So every programming language has its own way of doing things which is referred to as a syntax.
So the key thing to take away or you see the word syntax is referring to a programming language is vocabulary
and grammar.
Basically what this means is basically a set of rules of how your programs are constructed.
Thanks for watching and bye for now.