A dash of JavaScript

JavaScript is a programming language built into every browser. It makes pages dynamic. For example, you can show and hide things when the user clicks, create new HTML elements, and validate user data.

This course module introduces JavaScript. It's just enough so you can get started on CRUD apps in the next module.

The JS language has changed over the years. We'll use whatever programming style is easiest to understand. That means a mix of older and newer styles. When you find JS code on the web, the style might differ from what you see here.

Onward!

Exercise: Subdomain for JavaScript exercises
Make a subdomain called javascript. This is where your exercise solutions for this course module will go.

Add encryption, if you have Let's Encrypt.

Put an HTML file called index.html in the root of the subdomain. Recall that index.html is the default file that the server returns when the user doesn't type the file name.

Use <h1> and <p> tags in index.html. Add an animal joke.

Your page will have two URLs:

  • https://javascript.YOUR DOMAIN/index.html
  • https://javascript.YOUR DOMAIN

(If you didn't use encryption, the protocol will be http, not https.)

Test that both URLs work. Submit them both.

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)