All right.
Welcome back.
So in this video we're going to talk about statements.
So let's head over to our H2 Doc shortcut.
Let's click on learn basic javascript and control shift in type in 0 4 statements.
OK I'm going to close that out going so sublime close out the files I had him before click on 0 4 statements
right click to new file and control us and type an index that each terminal and then do control and
and control as we're going to domain.
J.S. OK.
So in the index tiny similar file once you type an HMO hit tab and then save that file.
And now I'm going to talk about JavaScript statements so javascript statements are composed of values
operators expressions keywords and comments so a statement tells the browser to write Hello world inside
and each terminal element with the idea of test.
So what I want you to do is I'm going to show you exactly what I'm talking about.
So let's go to the body tag here and we're going to add a script tag at the bottom with the source of
maned J.S..
OK.
And then we're going to close that.
Then let's go inside Amanda jazz and we're going to type out a document that get element by I.D. And
we're going to call the I.D. of test.
And we're going to do dot enter each HTML equals hello world.
I closed that out OK.
And I'm going to add a paragraph tag here with the idea of test.
Then let's close that have a right click and open in the browser you can see Hello World.
And if I inspect this you can see that the only reason that it's running is because of this file.
Now if I right click right click just hit the delete key on your keyboard it's still going to show up
because of I.D..
But if I delete and then obviously nothing's going to show up so that one reason it's working is because
of this mandate J.S..
And if we go to the C whereas debugger and then go to file and I go to mandate J as you can see it right
here we can changes the test to
I'm close that out close this out and that's javascript statements.
Now the next time we'll talk about a semicolons separate javascript statements and it's a semicolon
at the end of each executable statement.
So if we go to the main DOJ us and we type in if we type in var or variable a comma B comma C and then
I'm gonna write and declare three variables.
If we do a equals 10
assign the value ten to a B equals sixty.
Assign the value sixty to B and C Eagles a plus b
then it's gonna be what I get the wrong key here
assign the sum of a and b to c
when separated by semicolons multiple statements on one line are allowed.
So I show you that example a equals five column B
sorry semicolon B equals six C equals a plus b with a semicolon.
So
all right so that's all I have for this video.
Thanks for watching.
I'll see you in the next video.