JavaScript intro

A quick introduction to JavaScript, what its purpose is, and how it works in cooperation with HTML & CSS.

Go fullscreen: ⌃⌥F

JavaScript intro

JavaScript ≠ Java

Two completely different programming languages

Complete control

  • Complete control over your HTML & CSS
  • You can manipulate it any way you want
  • Adds more features that you can’t normally access

Think like a computer

  • JavaScript is a legit programming language
  • You need to start thinking like a computer
  • Computers only do exactly what you ask them

A new syntax

  • variable — a box that holds something

  • if-statement — branches our code 1 of 2 ways

  • loop — repeats our code a number of time

  • switch — multiple branches

Variable contents

  • string — just some text, surrounded in ‘’
  • number — just a number, no quotes
  • booleantrue or false
  • array — a collection, like <ol>
  • object — a named collection, like <dl>
  • function — a piece of re-usable code
Start

JavaScript intro

A quick introduction to JavaScript, what its purpose is, and how it works in cooperation with HTML & CSS.