All right, welcome to Intro to JavaScript for Web Development.
My name is John Elder and I'll be your instructor today.
In this course,
I'm going to teach you everything you need to know to start programming with
JavaScript.
These days, JavaScript is just so important for web development.
And it's actually a lot of fun to do and pretty easy to learn.
So before we jump in and start learning how to set up our development environment,
I want to take just a minute to talk about what to expect from the course.
The course is basically split into two halves.
In the first half, we're going to learn computer programming basics,
just essential programming skills, things like variables, operators, strings,
and numbers.
Then we'll move into more intermediate programming concepts like arrays, objects,
functions, if/else statements, and loops.
In the second half of the course,
we're going to be looking at practical JavaScript for websites.
We'll learn about DOM methods and properties, how to manipulate HTML and
CSS programmatically, events and event listeners, and nodes.
And then we'll learn all about form validation.
We'll spend a couple of videos looking at JSON and jQuery.
And we'll finish up the course learning about Ajax.
After that, we're going to build a math flashcard app.
And it's just going to take all the things that we learned throughout the course and
kind of put it together and give us a fun little project to work on and
something for you to put in your portfolio when you're finished.
So that's pretty much the course.
I'm looking forward to it, it's going to be a lot of fun.
And so let's just dive right in and
start talking about setting up a development environment.
So throughout this course,
I'm going to be using this cloud development environment called C9.
It's what you see on the screen right here.
But unfortunately, since we filmed this course, Amazon.com bought this company and
has since shut it down, so you can't use this exact tool.
Luckily, with JavaScript, you don't really need any tools.
All you need is a text editor, something to write code in,
and a web browser to run the code.
So that's what we're going to set up in this video.
So head over to Google and type in Sublime Text.
Now there are tons of coding text editors out there.
The one I like to use is Sublime Text, so
that's what I suggest you use throughout this course.
And just head over to sublimetext.com, click this Download For Windows, or
they also have Mac or a Linux version if you're on a different computer.
And right now we're on Sublime Text 3 Build 3207.
If this number changes by the time you watch this video, no big deal at all,
just download the latest version.
And when you click on this it should download anywhere,
just download it to your desktop.
And as soon as it's done downloading, you can see down here it's downloading very
quickly, you can just click this right here or
navigate to wherever you saved it on your computer and run the installation program.
Now I'm not going to run the installation program because there's nothing really to
show, just follow the prompts and click Next until it finishes installing.
And then head over to your Windows Start menu,
or if you're on Mac or Linux, search for Sublime Text and then open it up.
And this is what you'll see.
I'm just going to very, very quickly paste in a little HTML code.
And we don't care about what this code is, we'll talk about this later on.
But this is just a very, very simple sort of template.
What you want to do is come up here to File > Save As.
And then navigate, you could save this anywhere you want but
I'm going to suggest you go to the C directory.
And then somewhere in here, just right-click and create a new folder.
I suggest you call it javascript-course.
And this is where we're going to keep all the files that we create throughout
this course.
So double-click so you're inside of that directory, and
then just save this as index.html.
And you can notice down here that type in HTML file it always ends in .html,
so index.html and save that.
So next we want to come up here to Project > Add Folder to Project.
And again, we just want to navigate to wherever that
C drive JavaScript directory we just created.
You don't want to double-click, just single click to highlight it, and
then just click Select Folder, and you can see, boom, it pops up here on the left.
And now this will have all of our files that we'll save throughout the course.
If we ever create a new file, we'll just come up here, right-click, and
then just create a new file.
You can see it pops up right here and
then you can save it as whatever you want to save it as.
So like I said, throughout this course, I'll be using C9, which looks like this.
Whenever I type something here in the text editor, whatever I type there,
you'll type in right here in Sublime in the text editor area there.
So that's really the only difference between the two, so
it should be pretty easy to follow along.
Now how do we actually run this in a web browser?
Very, very simple, just head over here and right-click, and
click Open Containing Folder.
And you can see, let me size this a bit,
it opens our Windows sort of file manager thing.
And here's the file right here, and
you can see there's a little Chrome web browser icon next to it.
I use Chrome web browser, if you use a different browser like Firefox or Safari,
or whatever, the icon for that will be next to it.
All you have to do is then just double-click this, this page pops up.
And you can see we're in the C:/javascript-course directory,
here's the name of the file, and here's the page, says Hello World.
Like I said, not a very sophisticated website,
you can see right here it just says Hello World and you're good to go.
So throughout this course, like I said, I'm going to be using the C9.
You should be able to follow along exactly, do exactly the same things I do
in C9, you'll just do it here in the Sublime Text.
And then whenever you want to run your file, just like we did just now,
open it in a web browser and it should absolutely work.
So in the next video,
we're going to look at where to use JavaScript on your HTML page.