Jonas: So you already coded a line or two of JavaScript,
but what exactly is JavaScript, actually?
Well, that's what we're going to look at in this video,
and so in this lecture we will set the stage
for the rest of the course, and so it's really important
that you follow this one until the end, all right?
So, per definition, JavaScript is a lightweight,
cross-platform, object-oriented
computer programming language.
Now that sounds a bit too much, right?
But don't worry, it's simpler than what it sounds like.
So "lightweight" just means that the language
doesn't eat up much memory of the computer,
and that it has a relatively simple syntax and features.
"Cross-platform" means that the language
can be used on multiple platforms and systems,
not just for web development.
And finally, "object-oriented" means
that it's a language that's based on objects.
And we're going to explore all of that
throughout the course.
Now, as you already know, together with HTML and CSS,
JavaScript is one of the three
core technologies of web development.
And more on that in a second.
So, for web development, JavaScript has traditionally
only been used in the browser environment,
which means that it was only a client-side language.
However, more lately, thanks to
a new technology called node.js,
developers are now able to actually use JavaScript
on the server side as well.
But that is a whole big topic for itself,
and we will not cover that in this course.
So as I mentioned at the beginning,
this course covers the JavaScript language itself,
and how to use it in the browser,
which is the more traditional way, okay?
So in summary, JavaScript is what
made modern web development possible.
It allows us to not only add dynamic effects
and interactivity to more simple websites,
but it also allows us to develop complex
modern web applications that we can interact with
and that almost feel like the apps that we can use
on our computers and phones every single day.
Now something else that I think is important
to mention here is that today there are
lots of JavaScript libraries and frameworks out there
that implement different architectures
and help developers build complex apps
more easily and faster than ever.
So I'm talking about stuff like React,
or Angular, or even jQuery, which are all extremely popular,
and I'm sure that you have heard of them already, right?
Now the thing is, they are all 100% based on JavaScript,
and so before using them, developers
actually need to be really good at JavaScript.
They need to be really able to understand
the language itself, and that's exactly
where this course wants to help you.
So I mentioned that together with HTML and CSS,
JavaScript is one of the core technologies of the web,
and so let's go a bit deeper into that
and talk about the role of JavaScript in web development.
So HTML, CSS, and JavaScript all work together
to create beautiful, interactive, and dynamic
websites or web applications.
Now, HTML is responsible for the content of the page,
so the text, the images, the buttons,
and all the content that you see on a webpage
is always written in HTML.
Then the CSS of course is responsible for
the presentation of that content, so basically for styling
and for laying out the elements on the webpage.
And then finally JavaScript is
the real programming language that allows developers
to add dynamics into the picture, like interactive effects,
manipulation of the content or of the CSS,
and much, much more.
So again, HTML is responsible for the content,
CSS for the presentation, and JavaScript for adding
real programming capabilities to websites.
Now, another way to easily visualize
the role of each technology
is to put them in terms of nouns, adjectives, and verbs.
So in this, like, thought experiment,
HTML does the nouns, like saying that
the <p> element is a paragraph.
So paragraph here is the noun.
The CSS then is the adjective,
because it describes the noun,
like saying the paragraph text is red,
and so there is the adjective.
And then finally, JavaScript is the verb,
like saying hide the paragraph.
And so we are doing something here and so we have a verb.
Okay, does that make sense?
And so that is the role of JavaScript in web development.
And now just before we finish,
I want to quickly mention that there are different versions
of the JavaScript language.
But I'm not going to go into that right now, and instead
I'll leave that for the end of this section, okay?
For now I just want you to start coding as fast as possible,
and so we're going to use a version called ES5
over the next couple of lectures.
But again, at the end of this section,
there's a whole very important video about this.