📄️ JavaScript Intro
Now you have covered Html, and CSS. This is the last part of this documentation which is JavaScript. You have seen how you can present your web pages using CSS but you can add even more functionalities using JavaScript.
📄️ Ways to add JavaScript
When building a webpage, you would need to add JavaScript to your code. You can add JavaScript in primarily two ways which are internal and external. But you can also place JavaScript code in your html elements. In this section, you will learn about the different ways to add JavaScript to your html.
📄️ Variables
In the previous section, you learned about how to add javascript to a html file. In this section, you will learn about variables.
📄️ Variable naming rules and comments
JavaScript has a naming convention that it uses in naming JavaScript variables.
📄️ Data types in javascript
Data types
📄️ Conditional statements
Statements are considered conditional when they run as long as a certain condition is true. In Javascript the conditional statements are switch case and if statements. The if statements include if, if..else and else statements.
📄️ Loops
A loop in Javascript is a block of code that can run as long as its condition is true. Loops are used for iteration or repetition of certain commands you want to implement in your program.
📄️ Functions
Functions are used in JavaScript to run a block of code whenever it is needed. The use of functions ensures clean code and reduces repetition.
📄️ The DOM
In this section you are going to look at the Dom (Document Object Model). You can see the Dom as a means JavaScript uses to access Html and CSS. You will learn how to play around with the Dom in this section so let's get to it.