GAMR1520: Markup languages and scripting

javascript logo

Week 5: Introducing Javascript

Back to home

This week we will be providing an introduction to using the JavaScript language within a web browser. We will cover the basics of HTML templates, how to link JavaScript code, a brief introduction to the language, its data types, variables and data structures, we will introduce control flow and functions, event listeners and finally, the HTML canvas.

Lectures

Lecture 5.1: Introduction to JavaScript

In this lecture we will provide a bit of background and set the scene for working with javascript in the web browser. We cover the minimum required HTML template, a small amount of CSS and introduce some core Javascript syntax which we can compare to the python equivalent.

Lecture 5.2: The HTML canvas

In this lecture we will introduce the HTML canvas and the simple 2D rendering context which provides a JavaScript API for drawing shapes, lines and curves.

Lab exercises

Lab 5.1: Introduction to JavaScript

In this exercise we will introduce the fundamentals of using JavaScript within a browser. We explore some features of the developer console and cover basic DOM manipulation.