So there is no in this video we will talk about the basics, so this is from a political point of view
to know about the basics of the script.
But if you want to have a script, there are a lot of YouTube channel.
So they're teaching the JavaScript.
So even when you're doing some sort of E.S.P or is story, you don't need to write any dress code from
scratch.
All you have to do is you need to understand the dress code and what it is doing.
So even though all the members who got the story also said this one, like, you need to just go review
and identify the functions and you need to pass the exam so you no need to read the script from basics
of basic understanding of the JavaScript.
Nesenoff Because if you want to go in the script, it is like ocean JavaScript is like a nightmare.
And this is a programming language.
Yes, because we can do some logical operations and we can also do the object oriented programming in
this JavaScript.
That's what it is called programming, language and ambulance uses.
We cannot do any of the.
So this JavaScript is a kind of programming language that means it will execute on the client's browser.
So whenever this script has been loaded, it will be get a..
So this is a Puno.
This is the only language that will execute in the browser.
But in 2020, there is another language called.
It is also coming in, very innovative.
And so many of us are learning that the word in their website.
So let's talk about this.
So it is used for basic Krenzel validations.
Supposing you had a username and password and Dallas will first define like username you enter should
be like eight characters.
And if you enter the email in the TextField, then JavaScript says that you should have a direct symbol
in this mail.
If you did not put that, then it was a right.
Email is not very far.
That is not valid.
So that is like Krenzel validation and our script is also used for monitoring purposes.
So if you write and you are an example, this can be used for monitoring the example.
So if you switch the tab from a Jumptap to another Google tab, if you open a new tab, direct will
raise that reader to switch the tab and you can also switch anymore.
So this is very useful in creating such environments like monitoring environments and so much.
You can do the script.
I mean, like without refreshing the without sending any request to the server to access some server
with the cancer.
So and of triggers.
Now let's get started writing some code to include any script you need to sell script script that is
used to define the script code.
And this compared to script text can be put anywhere in your head that you and you can keep after the
body.
So I'm putting in the hash tag after the title.
So what you want to do is you can just put the script and it'll be executed by the browser.
So that's right.
So this is one type of notification.
Are you getting upset?
Let's say hello.
Sorry.
Hello.
And what we want to do is we want to put the semicolon at the end.
And so what I want to do is I want to install an extension cord.
I have already installed this.
As you can see, this is the razor wire extension for your call.
What is what it does is it will automatically refresh the page when we see original file.
So.
Right, click on this and you can see open with Sara.
So as you can see, a prototype has been opened and it's just not over.
So after Katrina, after Katrina, then our content is displayed.
So let me.
You like this?
So, right, I think it's reasonable, right?
OK, so first we got the box and then the content is blurred.
So first, if there are any attacks like this, then it will be to Dallas.
We can see this alert function in detecting any exercice vulnerabilities.
If you have already done, you will know that you keep the script alert and put some measures to detect
any exercice vulnerabilities.
OK, this is in line JavaScript, but we don't do like this.
We want to write the code in additional file and we will link to this.
So as you can see, whenever I'm changing the content of the Web site is getting automatically rerouted
by our line server extension.
So I want to script Ezzati easy calls to the more dodgiest.
So it's still not clear that all the day's.
So I want to show you one thing I want to write on this.
And if you go to council, this is like runtime environment apartment.
You can indicate that the script code here, that's alert.
Of high, so, you know, it's high, so you can just take mini console, you can execute some script
comments, I mean, statements which are clear, so clear.
So before we go that there is no tomorrow, so let's go and create that file.
So let me say this as the more I guess, the more that Jesus.
So if I here.
So, no, you did not get any error and also absurd has been refreshed.
Now let's write the same error.
A tough fight.
Well, as you can see, the Web site has been a bit slower and we got hype.
OK, no, this is the hope of that script and like random execution so we can put some content to this
console.
To do that.
You need to consult doctor, say hello or.
So as you can see, the word has been pointed to the console in this way, if you will, conventioneer,
you can get this address in this console according to the Regnum, with the right numbers.
So you can see the monitor, this current current number one.
So this number has been lowered.
So you can also generate error messages, console, not error.
See, my.
As you can see, there is a Red Cross symbol of my era, so if you got any error rate, uh, syntax
defining, then you will get this error with the message.
So this is one way of printing the hope to the console.
So let's talk about the variables.
So first, let me talk about the comments in the JavaScript that Bufano such have comments.
So this.
So this is.
So even after this, this is covered, did not print out because this is considered as a comment and
discard, I don't brother Somatuline comments are so Ashtar and start fresh.
If you're coming from C programming or C++, the same comments you can see the C in C++ can say hi.
So often we do not get any output.
So let's talk about these variables.
So there are three ways to define the variables.
One is using that and another one is using that and another one using constant.
So when I learned this in my college track two years ago, they had told me about only one constant.
So in this year's summer, I have learned again, basics are two ways to make sure that I am like a
river is a diverse group.
So then I saw this.
So this.
My guards have told me so many, so much, so much of the basic conduct.
So they do not even tell me what to read.
So I'm going to define the difference between these three first words stands for global rule.
You can declare a variable using water and that variable can be accessed by any function and any method
if that function changes this variable.
Then the weather will be changing, so that is local variable.
So if you define deselecting a function, then that variable cannot be accessibly alter their function.
So this constant is when you declare a variable using the constant, then that value is fixed.
You cannot reassign the same value, another value to the table.
So let me show.
Are these examples where.
It is equal to turn to put the same color.
So let me say let.
So even when I'm simply writing our lazara is being railroaded, you can see uncut reference that is
not defensins, we are defending it, so let's go and defend it.
Let be easy calls to county and take constant calls to confront SISA calls to.
All right.
Now, as you can see there.
But no, I want to release I will reassign the civil rights equal to 60.
So we got a settlement to consent to uncaught paper.
So this is a real paper because we have missed April because we cannot reassign the value to the content
available.
So once if you assign value for the and the to see value only for the.
So how do I put these variables you can take console off, so one way to increase output, these variables
are putting this this backwards so you can can see the backcourts and then you are to type is the value
of.
Of year, is it so effective this week, autobiographies yet, but we need to put the value of and that
is available.
So what you want to do is you want to set Dahler.
And open press and press in that process, you need to put the value of it so the value inside these
dollar open presses and business is interpreted by everybody will interpret it as a word and value that
very well, especially destroying so you can see the value of each.
So there is value stand in a similar way, I can say.
Console, not logoff.
Wary of bees.
So the area B has been.
So we have seen the basic rights and let me tell you this continually pushed so in other programming
languages like C, C++, Java, you need to define the data type type.
So you want to if you want to say integer, you need to you need to be constantly like 30.
So in this JavaScript, in only two defenders, you can just select and be able to stream.
That's a lot.
Or.
So now we use whatever we can, just simply assign a string or no other floating point where you could
without worrying about the stereotypes.
And to check the tape of that, we will need to say.
So what you want to do is there is no matter what type of new type of.
OK.
I think it works as a string of carrots.
So there is a type of function in the script which defines the returns, the value of the paper, that
variable.
So I have said here I have said here that the type of be used, this is just a message to print and
the type of beat this type of is the word function you can use in that type of beat.
You can see these print, right?
That's what it has been.
Our production, if I say value of here, it will output as a number.
So there is no integer after this point, it it will JavaScript will take everything as a No.
So, no, I want to discuss about the loop's so sorry, first I will discuss about the relationship
operators.
First, let me discuss about this addition subtraction division, then we'll go to the relationship
operators.
So as you can see, the entire year has been utterly clear that this this.
OK.
OK, I'm sorry, I'm sorry.
I'll take everything I need to say this as again, because it will be fine, but I have put the that
is close to 30 and that is close to 40.
Now, let's see.
Is he to A plus B?
Now, the sequel contains the original, these two numbers, 30, 40 to 70, now I, I try to output
this.
I see you got the value seventy five to minus eight, minus 10.
So if I say, uh, multiplication, I get 400.
And I some point something.
Get your pants on fire.
So in this way, these additional unnormal arithmetic operations work.
I don't know whether or not I should get that right.
Yes, this double slash can also be worked as the, uh, reminder operator.
So there are other possibilities, a greater than greater than equal to less than a quarter and almost
equal.
I mean.
And so we look at this, so you study and be useful to since then, let's check that you're less than.
So you have got the truth.
So this is the bully that the bullying that attempts only to produce that is either true or false,
and that indicates that the statement is true or false.
So it is then that it is then we obviously it is true, right.
That we we got the truth.
And if I said greater, then so we got the facts.
There was a greater than equal to you can say for us unless we get the truth.
So if I say it is equal ridiculous to be with two of us.
So this is as close to as close to is equal to be stands for.
We need to compare the values of 30 and 40, not that we can work these values to three.
That means that the industry and the industry and then it will compare the to the competition, whether
they are equal or not.
So there is also called that particular tool that stands for the data types of it, and we are also
took 40.
So there are true they are true because you're using integer 40 and B's also integer 40 to be used to
string 40, we get the first because the data types of A and B are different JS Integer and B, that's
what we got.
So I think you have understood the underlying use that were equal to to make sure that they're both
data and both are equal.
So now let's talk about the groups so these groups are using for repeating the same process over some
number of times.
So the syntax on first one is really a new set of rules for where I use equals to zero because I use
it in many programming language as an interpreter, because it's in the literature that I then generally
use a phrase equal to zero I less than.
Uh, quanti I prosperous.
So what this means, first, we are declaring a variable, I use digital and the second one is comparison
statement, whether we are comparing eight.
Twenty eight are 20 and that we are implementing I press press.
So I press press.
Means I is equals to Cyprus, so we are included in the value of it.
So this group will execute until the IRS to 20 conditions, I suppose, after Rupi 19 times you get
that used consistently.
So after checking, I used constantly.
This condition will get false and then this code inside this open process will not get executed.
So that's a console, not a log of.
So as you can see, the values of why we are spending and those are from DILTON 19 so far at first iteration,
I should you know, since I use less than 20, then it will execute this.
A statement which is printing zero, and then Disvalue gets incremented to run, and then again, this
will continue until I just don't want it.
So after 19, I becomes 28.
This statement I press first and then decide there are 26.
So 20 is not less than because be the easy question.
That's why we got the.
That's why this group got Exeter.
So another important group we are going to see is while.
So why is also like similar to this Farrukh, so in why we need to implement biannually not in the loop.
So let me show you that it's a very easy cause to derail again.
And what you want to see is while a condition.
So we need to specify the condition only.
I don't want to be so open to the idea that one day this group gets executed.
So let's consider of I.
So we have got we have the value for a to.
And then I just don't want to.
So it's true and that we are printing the value of it.
And this executes infinitely because we are not incrementing that value.
And for every iteration of a loop, I value Stagedoor.
That's what we want, is we want a prosperous.
So you have done great, we are done, correct?
Sorry, could you open manually?
Means suspect concern.
So, as you can see, there are zero to 20.
So let me remove this.
And as you can see, the number increases because we are not in the eye.
And I said zero.
And you don't want to it will disrupt, will execute.
Unfortunately, that care should be taken that you need to this variable is or not.
OK, but because this.
So.
So here we are, including Disvalue and we got the dilator, 19 values.
So next, I'm going to tell you if flew.
The syntaxes involved condition and since we have caught the eye is this close to 19, we can say.
So that's simply I can't be.
And I want to test if the value of AI is equal to 20 or not.
For that I want to say is equal is equal to 20.
I want to check the data also.
And then I want to open a process and then I can put cancer.
Rogoff I value is equal to 20.
So first, we have the youth culture of 2010, we are taking the condition is called, the question
is constantly in the loop.
If this condition is satisfied, the code inside this open process, that it could be reversed.
And you can see the value of I used to know, I want to check.
So the value of I just want to else I should value is not going to dictate that you can say.
So if the rally is equal to 20, then it prints that value of 20 as we get the output value of it is
not only let's make the way I use to 30 and then refresh our page so you can see where we are five years,
not 20.
So what if we want to check whether the greater than 20 or less than 20 or 30 at Antioco?
So first, in condition we have the equality and we can write more if groups like the first group using
that elusive conservative of condition and if I greater than Konta, we need to set value of a.
Is greater than.
So and then we can say, Alice, so if this is equal opportunity and are greater than the 20 and the
rush conditions will be less than 20, you can just consolidate less than 20.
So we get the output's value of greater than quality because we have said diversity Astarte.
So now I'm going to change I value to 10, since it is less than Compte, this is a good value of less
than 20 and see value of less than 20.
So let me comment for this while.
Loop for a while.
OK, fine, now I'll put it somewhere cleaner.
Now, these are some basics of the script.
Now you'll see the area and then you'll see that the model that is document object model, which is
very important one and particular at it to say that it is equal to a new array of.
New array of you need to specify the values you want to put that in a.
So pretty busy recruit Gay has already been.
So let me take this one as a.
So let me point out the area where you.
So you can see there are three values only under represented by one, two, three.
And here you can see the land value tree, OK, and then a different index.
We have got that one.
So in Dallas group or any other programming languages, that is indexed to start from zero.
So the first value will be the Geto index and the first one value one.
Right.
And the second element is the first index and the third value is the second index.
You can see here the index is the first element and the index is the second element.
And it's its second index is the third element.
You can access these single elements using the brackets, square brackets.
We can sit around to refresh this page, can see the value is only one.
So the first element of this added that is zero it index and that is one for change to one.
I get the value as to.
Two, you can also specify the strings also so in that it can help multiple decades in other programs,
things like C, C++, Java, at issue, content or senior debt or the latter is declared as integer,
which would contain already just that is considered as a character in all the characters.
General, that is can contain multiple narratives.
That's height.
And they can exist using this for.
Right.
So there is no 420 sorry, that is three my chickens, the value of my husband and we can loop all through
this array using the for loop you can check for.
Close to zero, since we have previously declared, I'm not going to declare, I guess then we can get
the rest of this array using the adulterant.
Because we don't know in this case, we know that there are four elements, but in general, I guess
we don't know the rest of the area.
That's why we got the arrest warrant using the area land and then I prosperous.
So if the added value is for in our case, the I that this could from high school to zero four zero
one, two, three, those are the nexus of order.
So we can all put this concert out of can array of I.
So at each iteration I get to the place.
What do you want to achieve.
You get at a rate of zero.
One, two, three.
Want treat these elements.
So instead of this, I can see values of are these areas of parental involvement, so there is another
way of declaring that is.
So this is like coming where you can see another problem now.
Yes, sir.
Four, five, six, seven, eight, nine.
So this is our one.
So we have got the tourists at one another, too, and we can just contact Nick.
I mean, at these tourists.
Going to add one that can get.
So one thing I sure is, if you take any every object dirt and you can see the studio has been showing
me some methods of that object, I can see it can see the land and these purple cubes are the functions
and these blue cubes are the variables.
So what I want to do is can can get off, too.
So let me run this one.
So everyone did not get this government and take the red one and you add all the elements of the data
to the end of the area.
So in our case, everyone did not change because this will apply.
This will not operate everyone.
But what you want to do is you need to add one is equal to.
So do you.
OK, we have got the one for elementary to fundaments, so everyone that can turn it off, ready to
return to and paid holiday, which consists of elements of everyone.
And so that will be assigned to everyone.
So if which you can see the whole array contains one, two, three high and also elements of the array.
So this is one way of concatenating elements so you can append the values to the array using the Bush
operation.
Add one to push off.
You need to the last item.
So for this one, you can see the last item has been added to push added to the end of the.
So these are the basics of JavaScript, no more to the DOM model.
I don't think of Dumitru to transfer document object model.
It means that the integrity will be treated as object three and we can access these elements using some
ideas and classes.
So since this model has been linked to indexer detriment, we can access these elements of achievement
using the ideas and classes so this can manipulate the elements of this system.
So, OK, this is the simple paragraph we have here.
Now, what I want to do is I want to say it is equal to eighty one.
So this paragraph has a eighty, eighty one and we can access this paragraph using the document methods
that one is document.
Dogged by a.
So when the your has been suggesting me to use this, these methods are available.
So we need to speak with the idea government by idea of 81.
Now, there is we have got the object now what do you need to change that paragraph?
That means this one and this can be accessed by enraged animal property.
You can see that in HDMI in which you can see the net is smaller.
And Hedstrom.
Uh.
As you can also see, the Illuminati are the casualties.
So I want to modify modified paragraph.
So let me call this Consolo.
So we have access to that paragraph already using the Gittleman by 80 of anyone, and then we are changing
the objects in our history, that is that this one, this is the paragraph.
And upon execution, you this text will be replaced by this modified paragraph text if we if I refer
this.
OK, yeah.
Well, this did not get modified.
Documented by Ali.
OK, sorry, this one is this big rock has also the idea that we may be confused about using Michon.
So now if I run that government file, this is a simple paragraph, there will be no modified paragraph
for free speech.
So still it's not getting.
So let me change it to sample.
All right.
Well, you just got.
No, I have to this error.
What do you want to do is we need to flush the Skrappy's executing and then it is like asking the sample
and then changing the enrichment because it's saying the enrichment of when the script is good, when
it is executing, it is not finding the whole paragraph.
So what I want to read, I will cut this one and I will after body so that we make sure that these all
elements are first loaded into the chamber and then upon execution of the already the file will be loaded.
I mean, other criminal elements will get loaded and then this could be a ticket at the last saltpetre
for this.
Now you can see the modified paragraph.
So this is one mistake I have done so far.
So good practice to keep the script at the end of the Extremophile.
OK, in this way, you can modify the elements.
So this is general and most by many good element by 80.
So there is another Whiteaker, Gittleman Krasno.
And if I say.
Sorry, OK.
All right, we have another paragraph so that a crisis equals.
But the glass is equal to sample, too.
Now, I can access this by document, not that relevant 11 class.
And we need to speak with a class I want to access a sample to.
OK, now what I want to do is either cancel this concert.
Now, as you can see, now we got the collection.
So in the collection, the index is put out and that is paragraph with a cast assembled to access this,
uh, instrument collection we want to share.
It is like a you can access using the square brackets and the hash tag is Girot zero.
That is the paragraph that Sam and what you want to say, you want to change the amount of the actual
content of the paragraph 10.
It's a modified Glassboro.
Modified it paragraph could be much clearer for us.
So if you can see the modified paragraph and modified paragraph, so it's one input.
One problem is we are trying to modify the paragraph.
We can also share a button and our clicking that button, a functional can a..
So that's a button.
I was it me?
So this brick line breaks and the button and two bricks that CO2, so this cracked me, has no functionality
for this multiple times, it will not happen so we can execute a function on this button.
So I could say there is actual cut on Pleck and I should mention the function so that it could function.
And we need to write this particular function in our Dallas file, so to write a simple functions,
you can sir function.
Function and the function.
And you want to write some code or to happen after curfew in this water, so functions are very like
a simple piece of code.
If you have a thousand lines of code you want to ticket four times, you need to copy paste all those
thousands of code four times.
What you can do is you can copy paste it in this function and you can call this single function four
times so that your total lines of code red good for four times for simplicity purposes only to make
the size of the code bigger so you can use the functions.
So let me copy this sample.
Let me cut this actually to find some to find the difference here.
So upon clicking the button, we are changing the paragraph into the modifier paragraph.
So let me show you this one refreshing.
You can see this JavaScript has been executed.
This is the last paragraph.
No, this is the same paragraph which belongs to this example.
Now, upon clicking the button, this function that you could do.
So what this function does is it will change the contents of this sample, every paragraph to modify
paragraph, modifier every paragraph.
So I am going to at this and you can see the text has been changed to modify every paragraph.
So this is like basic functionality you can add by four buttons.
You can also cut this line and you can already hear.
So for this, when clicking this button, the paragraph gets changed, as you can see.
OK, now I can also change the Sears's states, let me copy this.
So one way to access this, she is stating she's using dot operator and you can see her Dodge style.
That property, so what property of the CSA state, you know, Daejeon that Chikara.
And what I want to do is instead of modify every paragraph, I need to simply read so know upon approaching
this page, we got the same photograph and paragraph for this one.
You can see the text has been changed to modify every paragraph and the color also has been changed
to read.
I can also simply say font family also.
So there are a lot of there are ton of properties and methods for the top down model.
You can just refer online or there is a Mozilla network's recommendation on JavaScript and its users.
Also, you can infer that that is the best documentation ever.
And I can say fun and family.
I need to specify the font I want to use.
That's Helvetica.
So fond of fishing for a click the button, you can see the front also change it to Helvetica.
So I think I have covered the most basics of this JavaScript that said about this Dallas couple, and
you can also pass the parameters also.
So one thing I need to show you is you can write the content, too.
That I forgot.
I think I forgot this mother document that right?
Yes, right.
And you need to write the code.
So let me show you this one also, someone clicking this button, the extra code should be added.
OK, it has been changed everything.
OK, I'm sorry, I just forgot this right entitlement because generally developers use the console rather
than this right of return and this.
OK, upon changing all this, that doctrine not right, got executer.
So this document can be used for some user recognition, suppression and so on.
And I want to show you another one called Dortmunder Kookie, I think our history does not contain.
So this document, that cookie, contains the cookies of that particular session in the website, generally,
you do not have any server side cookies, but I want to just show you the syntax for cooking.
OK, that's fine.
And then if I go to this inspect console, so there is no cookie.
OK, there is no queue for this simple.
It still manages this, so whenever you are dealing with some websites, they will definitely send a
cookie and you can access this cookie using this document, that cookie property.
So the whole document cookie will be displayed using this document.
Cookie.
So whenever you have some exercise, you can execute this document or cookie to see the cookies.
Also, you can send these cookies to any server.
It's called cookie feeding using accessors or you can also call it a session looking.
So you see this in our testing.
But I want to show you this document, that cookie.
You can access the cookie.
So I think these are the basics you need to know about the JavaScript.
If you are nice in this case, you are pretty much good.
But if you want to go deep to go, OK, that's not bad.
You can just search for you to prepare us to.
This is but I'm not going to cover all the code here.
I just showed you the basics.
So that's all for the basic Sadowsky.