Day 1 - Introduction to Javascript
Housekeeping
- CPNT 260 marks returned for:
- Achievements Round 2
- Assignment 3: Sticky Footers
- CPNT 260 Assignment 4 returned tomorrow;
1. Sticky footer walk-through
2. Slides: Introduction to Javascript
Demo: Installing a JS library (RevealJS) using a CDN
- Installation
- Note: these instructions don’t include the CDN method;
- Live Demo
- Marking up Slides
- Config Options
3. Activity: Group project slide deck
Not for marks
In your 260 groups, use RevealJS to build a slide deck about your project (don’t worry, there’s no presentation with this project).
Popular configurations:
- Set
hash
totrue
to be able to link to individual slides; - Set
controls
tofalse
to turn off arrows in bottom right corner;- Or set
controlsLayout
to move the controls to another part of the screen;
- Or set
- Set
history
totrue
to add slide changes to browser history; - Set
autoSlide
totrue
to auto advance slides; - Set
transition
to pick a slide transition (options:none
/fade
/slide
/convex
/concave
/zoom
);
4. Lab Time
Homework
- Learn JavaScript in 1 Hour by Mosh
- Exercises: Javascript basics on Free Code Camp
Prep
Watch List
We’ll be jumping around quite a bit but this is a great introduction to JS that covers most of the topics we’ll be covering.
- Learn JavaScript in 1 Hour by Mosh
- 00:00 What is JavaScript
- 04:41 Setting Up the Development Environment
- 07:52 JavaScript in Browsers
- 11:41 Separation of Concerns
- 13:47 JavaScript in Node
- 16:11 Variables
- 21:49 Constants
- 23:35 Primitive Types
- 26:47 Dynamic Typing
- 30:06 Objects
- 35:22 Arrays
- 39:41 Functions
- 44:22 Types of Functions
Optional: Other courses and resources
There are a lot of free courses and textbooks that you can also refer to. Some favourites from past students:
- Freecode Camp:
- Code Academy: Introduction to Javascript
- Online textbook: Eloquent Javascript by Marijn Haverbeke