Announcements
Friday is the Midterm #2
Bring photo ID
Covers Everything Since MT 1
Digital Representation
Computers
Algorithms
JS Programming
~ Lectures 16/17

JavaScript Wrap Up
JavaScript is a versatile programming language … if you know it, you can learn others

The Big Picture
Without JavaScript, HTML is quite limited
Only static page-layouts are possible
JS allows
Adaptivity … the page can be customized to the browser, site, user, etc.
Interactivity … users can give information and a response can be displayed: Memory Bank
Applications … tasks unrelated to documents can be created
Animations

Big Picture
Notice the standard HTML process
HTML is parsed -- read & “decoded”
During parse JavaScript runs … allowing it to generate HTML, e.g. document.write()
Browser generates the page from HTML
After page generated all is quiet until an event happens, caused by user or timer
Event handlers handle the events, and then all is quiet again

Consider The OC
Analyze the process for Orange Con
HTML is parsed
JavaScript runs …
HTML generated
Browser makes page
All is quiet except for
events from user/timer
Event handlers handle
events, quiet returns

Other Languages
JS is a “modern” programming language like C, C++, Java, etc.
Expect to find numbers, strings, Booleans,
Variables (of same form) must be declared
There are if-statements & else-statements
There is a for-statement
for (j=0; j<5; j++){
<statement list>
}

Review & Tutorial
Got questions?