# Introduction

## How to use the resources

Each topic comes with teaching slides. These are designed to be used by teachers during lesson (although also by students for revision), and are purposely brief to maximise time on the online tasks.

The use of these slides can be interspersed with mini-tasks on this platform. There are 4 types of task:

### #1 :: Console rigs:

The box in the right listens to any text outputted on console.log. Ordinarily you would be able to see any outputted text using your browser's developer tools. In Google Chrome for example, press Ctrl + Shift + I and select the Console tab. Try pressing the Run button below:

Reset to Original Code     Fullscreen

### #2 :: Input rigs:

These are designed to test a particular function (you will learn more about these in Section 2f), and test whether the expected output is seen for difficult inputs. Try the below:

Reset to Original Code     Fullscreen

### #3 :: Interface

This is designed to test/develop more general interfaces, e.g. clicking a button and the subsequent response, drawing on a canvas, etc. HTML is expected in the box, and any JavaScript code must be put between <script> tags. Try below:

Reset to Original Code     Fullscreen

### #4 :: Multiple Choice

Sometimes you will be required to answer multiple choice answers. Either a single answer is required, or check all boxes that apply.

"Which of these is 4 in binary?"

You are encouraged to Register on the site as a DFM user, as any code you write will be preserved, including answers to multiple choice questions. Teacher accounts will be able to see student submissions.

## Why is JavaScript used on this course?

The programming concepts you will learn will be applicable to most languages, but we think it's important you become fluent in at least one language. There are a number of reasons why we've chosen JavaScript

1. It runs on any computer with a browser, without the need for any software/compilers and without the need for code to be compiled.
2. Being a web-based language, it makes it easier for students to build user-interfaces and share what they've done.
3. It supports various aspects of Object-Orientation, i.e. JSONs, but without the more complicated concepts such as inheritance (which is not in the GCSE syllabus).
4. It enables more functionality to be available on this online platform.
5. It's a weakly-typed language, meaning that variable types are flexible, and making the learning curve slightly less steep.