OK, we'll welcome back to the course now we're on Section two lessons, seven online resources.
So the purpose of this is just to show you that if you are stuck in JavaScript or you don't understand
what some word means, or you need to see an example of some of the code in action so that you can fix
a problem, then there are tons of resources online and these are just the three biggest ones.
But there are many others.
And you can check tons of examples of projects that are out there.
But let's get started with just these three.
So three schools and this is from the W3 Foundation, and they're actually very central to just education
on the Internet in general.
So they have this wonderful website of three schools, dot com.
And then we'll also look at the Mozilla developer network.
And this is great because, well, the founder of Mozilla, which is the creator of the Firefox browser,
that's Brendan Eich.
And so he was the one that created JavaScript.
So that's why this is an amazing resource for JavaScript as well.
And then there's a stack overflow.
This is a wonderful website from Stock Exchange, and it's basically an open source community of developers
asking and answering each other's questions.
And so there are millions of questions and millions and millions of answers on all kinds of little things
that people do in all programming languages, not just JavaScript.
So let's take a look at these more in depth.
So here is three schools on the intro to JavaScript.
You can take a look and see.
There is a whole menu where you can go into each different concept.
In JavaScript, you can look at syntax, comments, variables, numbers, strings, dates for loops,
hoisting scop, arrow functions.
These are all things that we're going to discuss in our course and the differences between S5 and Ethics
and JSON and then so much more about objects and functions and classes, asynchronous coding, DOM,
antipollution, lots of different things.
OK, so let's dig into just an example.
One of the best things that I love about three schools and their JavaScript page is that they have a
try it yourself example on just about every single page they can.
You can click here and you can see how JavaScript is rendered in a browser window, how it is working
in the middle of an HTML document.
You can see if we run this it and you just click this button here, it changes the text from one thing
to another.
So on click, it's going to it's just executing the JavaScript right here in this button on click normally.
Normally what you do is unclick would have a reference to a specific JavaScript file or a reference
to a specific script element on the page.
But this one just straight up puts the JavaScript right in there and it does document dot get element
by ID demo.
So it's looking in this HTML for the demo tag and it looks for this selector of ID equals demo.
Once it finds that ID, it looks at the inner HTML.
So that just means what's between the opening tag and the closing tag of this HTML element right here.
And so once it finds that Internet e-mail, it changes it at reassigns the value to hello, JavaScript.
So that's what you see when you run that right there.
It'll change this.
That's the default to the content that is specified right here.
Hello, JavaScript.
And you can see the way this works is there's a single quotes and then they use double quotes to keep
things separated.
OK, so that's an example of JavaScript running in a Web browser and you just do it directly inside
this unclick attribute of this button element in HTML.
Just writing the JavaScript directly in there.
You could do an insanely long JavaScript file right here, just separated with semicolons if you wanted
to.
All right, so that's an example, and that's what makes three schools so helpful, is that you can
look at these documentation pages for JavaScript, SQL, Python, lots of different languages, but
it's very, very all inclusive for JavaScript.
And as I said there, try it yourself.
Links just about everywhere.
You can try this yourself.
And then we'll open up this test.
Suite where you can.
Download this, you can run it, you can change anything, so if I wanted to change this from ten over
nine, try it.
It's going to stay true if I change this to eight over nine and run it.
It's going to say false because eight is not greater than nine.
OK.
So there you go.
So this is there was a test of boolean logic boolean just means checking if something is true or false.
OK, so there you go.
That's three schools I highly recommend checking this resource out first, whenever you run into a simple
question of what does a specific word do, what does a specific function do in JavaScript?
So it will help you a lot with understanding variables and all the other data types that can be assigned
to variables and different ways of manipulating information in JavaScript.
OK, then we move on to Mozilla and the Mozilla Developer Network.
This is just resources for developers by developers.
It's also open source, but it's organized by the Mozilla Foundation.
So if you go, you can look at web technologies.
And you can look at Web references for JavaScript.
And so on this page, you can reference all of these different things, look for builtin objects, expression's
functions, classes, look at complete beginners.
So I would definitely start with JavaScript basics and first steps and look at some of these things
in here.
You can look at guides and you can feel free to search if you want to search for something specific,
like you could search for, let it.
So in this the Web JavaScript reference statements, let the statement declares a block scoped local
variable optionally initializing it to a value.
And then they have an example in here, and just like in three schools, they have an example that you
can test and run.
Not every page has these examples, but many of them do.
And then you can change these right in here.
So I can change that one X plus two and run it again instead of one.
I get three.
So, yeah, it's perfect and you can reset it.
So this is a fantastic resource and likewise has references for not just JavaScript but some other languages
as well.
OK, and then the final one I want to cover today is stack overflow.
Zoom in a little bit on this.
So Stack Overflow is is this great website where developers basically just ask each other questions
and get answers.
For the most part, the way people access questions on Stack Overflow is simply by Googling a question.
And then Stack Overflow is typically one of the top few responses.
But you could just put something in here like how to reverse a string in JavaScript.
OK, and then you might need to comply with some robot query.
And then there you go, trying to reverse a string, using a phrase not by classic method, but it doesn't
work as expected, how to reverse the string recursively, how to reverse the string in JavaScript in
a for loop.
So there's all kinds of different examples and questions.
You'll probably find something that's close to what you're looking for.
And so basically, there are lots of different answers, typically, if you were to ask a question on
here, you would get an answer fairly quickly.
But before you ask any questions on Stack Overflow, definitely search for your answer and see if it's
already been asked nine times out of ten, probably closer to ninety nine times out of one hundred.
Your question has already been asked, so you'll be able to find multiple answers for it and you'll
be able to get on your way very quickly.
But all of these questions are in here because somebody asked them originally.
So don't be afraid to ask if you don't see an answer.
OK.
So that is stack overflow.
I highly recommend using it to find any kind of niche answers or more significant examples of fourth
resource, which is kind of a bonus, is simply to put in GitHub and then your question.
So you do GitHub or string.
Then and we want to say jazz, then what it'll do is it will link you to specific git hub repos where
people have tried to implement different things that might be related to your question.
So we can go to this one and there's a string reverse in JavaScript and it just shows you somebody's
actual project where they have made an attempt at something related to what you're asking about.
So definitely using these four resources, w three schools.
The Mozilla developer network stack overflow and GitHub itself, you should be able to find almost every
answer that you're looking for while you're coding JavaScript from time to time, there's something
you won't be able to find.
And so it's I highly recommend getting in touch with a developer community.
So that's what these are as well.
But if you could get in touch with developers, find them, you know, people that have gone through
coding schools, then you should be able to get a lot of help.
Developers, for the most part, are very interested in helping one another.
There's there's not a competition mentality that's that you see in a lot of other industries.
Very much so.
Everyone wants to help each other with these projects because the more code is built, the more things
people can do.
And it really benefits pretty much everyone to have open source projects that we can all contribute
to.
So that's it for this lesson.
And let's go back to.
The review, so that was online resources next are going to do a challenge where we're just going to
do some actual JavaScript code and do a simple hello world.
OK, we'll come back to that.