Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 2.1 KB

File metadata and controls

67 lines (48 loc) · 2.1 KB
layout title desc slides
slide-deck
JavaScript intro
A quick introduction to JavaScript, what its purpose is, and how it works in cooperation with HTML & CSS.
type content
super-big-text
**JavaScript intro**
content notes
## JavaScript ≠ Java *Two completely different programming languages*
When searching for answers **do not** search for Java—you’ll get confusing results because the Java programming language is *completely different* from JavaScript.
type image notes
image
layer-3.svg
Remember the “Peanut M&M” analogy? Well we’ve so far only talked about the peanut (HTML/content) & the chocolate (CSS/design), now we’re going to talk about the candy: JavaScript. JS isn’t necessary for a website (a chocolate covered peanut is still quite delicious) but depends completely on CSS & HTML to function.
content
## 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
content
## 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
content
## 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
content
## Variable contents - `string` — just some text, surrounded in '' - `number` — just a number, no quotes - `boolean` — `true` or `false` - `array` — a collection, like `<ol>` - `object` — a named collection, like `<dl>` - `function` — a piece of re-usable code
content
## Videos & tutorials - [JavaScript syntax ➔](/topics/javascript-syntax/) - [JavaScript validator ➔](/topics/validators/#validating-javascript) - [JavaScript cheat sheet ➔](/topics/javascript-cheat-sheet/)