Adds functionality to our web pages
Just html and css alone are great and are the backbones to any website. They show the content, display it in such a way that is appealing to the end user. But what about a form? Sure with html and css you can create a form and make it so users can type into the form but how do you get that information to be sent? For the form to actually do it's job. That is where languages like JS come in. They are the logic behind things like a form that say ok when this button is clicked I want you to do the following with the information. Granted there are other things that need to happen for that form to really work correctly, but in the most basic sense of it that is what JS solves.
It adds that logic that is needed so that other programs or our databases can actually do what they need to do. When you log into your email account through the browser you have to log in. That form is using a programming language like JS to send the information you put into the form and send it to the backend to be then checked if it is correct, which if it is that same function you just activated is now going to redirect your page to your inbox.
Ok cool can we see some functions that are more than just a + b , things we will use in the real world?
Ask no further, open up the html doc in your browser and have some fun...then look at the corresponding code, see what js function is actually working with each button. I will have breakdowns of each function below them (commented out)
A link to a video demonstrating the code contained = https://youtu.be/-CS47mzpo4o