Introduction to 

 JavaScript

< HTML / CSS

JS OO >

HTML / CSS

  • Markup languages
  • For presenting content / data
  • Static (modulo animations)

Wanted: Interactivity!

  • trigger events when users click, press keys, &c
  • update the page dynamically based on those events
  • fetch and display new data without leaving the page

Examples

  • live search filters which update as you type
  • apps like maps or stock tickers
  • these slides!

We should learn JavaScript!

- Me, 2017

We should invent JavaScript!

- Brendan Eich, 1995

We should invent Mocha!

- Brendan Eich, 1995

We should invent LiveScript!

- Brendan Eich, 1995

Netscape

  • Was a startup
  • Spiked out a quick v1
  • Launched an imperfect (but very popular) product
  • Planned to iterate and improve over time

Wanted

A language to run in the user's browser

Problem

That language runs in the user's browser

The User's Machine

  • users have to trust us (and conversely)
  • don't have control over which browser and version is used
  • browser implementations haven't always been consistent or cooperative

The Browser Wars

The Browser Wars

Today

  • ECMA maintains the ECMAScript specification
    • Periodically publishes new versions
  • All major browsers support reasonably recent versions
  • JavaScript is the language of the web
  • JavaScript also now runs elsewhere, everywhere

For Us

For now, we'll focus on

  • core parts of the language supported across all browsers
  • JavaScript running in the browser

Ready?

Head to http://codepen.io/collection/XBLJxx to get started

Made with Slides.com