Introduction to Javascript - ConceptaNjolima/Afro-Fem-coders-Mobile-Web-Dev Wiki

In the past weeks, we have learnt about HTML and CSS and this far, we can create a website with all the text and the styling. However, websites are more than static text, they have actions that are prompted by a certain input. Have you seen pop ups when using some website? Since we have covered most parts of the website, what do you think causes the popup windows? HTML or CSS? You guessed it! None of the above.. It is actually Javascript that we will use to make our websites dynamic and interactive.

I found a really nice resource about how HTML, CSS, and Javascript interact here

In summary, Javascript is a programming language that helps web developers make web pages more dynamic and interactive.

html, JS, CSS

Let’s dive right in

Data Types in Javascript

In programming, there are different ways numbers, words, decimals, and other values(referred to as data types) are stored in computer memory. The way a word is stored should be able to tell a computer that this is a word and not an integer. For the start, we will look at four major data types in Javascript:

Key operators:

The type of operator is used to check the data types of an operator For example, typeof(“Check Me”) returns “string” which shows us that “Check Me” is of datatype string. What would typeof(2) return? We will run typeof(2) in the spck editor as shown in this video to check what it returns.

There is a detailed explanation of different data types in Javascript here

Extra resources:

  1. Static Vs Dynamic websites
  2. Interactive websites
  3. Comments and documenting code
  4. Javascript for Web designers. I recommend stopping at 15 minutes because we have not yet covered the content beyond 15 minutes.