JavaScript

JavaScript (JS) is a programming language that is used to create interactive websites.

Including JS scripts in HTML files

In HTML, JavaScript code is inserted between <script> and </script> tags. Alternatively, you can include a separate .js file. For example:

<script>
    document.getElementById("demo").innerHTML = "My First JavaScript";
</script>

Or

<script src="script.js"></script>

Variables

JavaScript variables are containers or storing data values. To declare a variable, we can use the keyword “var”. For example:

var myNumber = 1;
var myColor = "Red";

To find out more about variables, go to https://www.w3schools.com/js/js_variables.asp

Functions

A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when "something" invokes it (calls it). To create a function we use the keyword “function”. For example:

function myFunction(p1, p2) {
    return p1 * p2; // The function returns the product of p1 and p2
}

JQuery

jQuery is a JavaScript library which greatly simplifies JavaScript programming. The purpose of jQuery is to make it much easier to use JavaScript on your website.

To learn about JQuery: https://www.w3schools.com/jquery/default.asp

To learn more about JS https://www.w3schools.com/js/default.asp

Bootstrap

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Grid system

The most important thing about bootstrap is its grid system. To learn about the grid system and how you can create responsive websites using bootstrap, check out this tutorial: https://getbootstrap.com/docs/4.0/layout/grid/

To learn more about Bootstrap, you can read the official documentation here: https://getbootstrap.com/docs/4.0/getting-started/introduction/

Last updated