background
|
|
Computer

Games
Ruffnecks Gaming
Gaming for everyone
More icon
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Thau's JavaScript Tutorial
Lesson 2

by Thau!

Page 11 — Review

To review, here are the things we covered today. If you feel like you didn't learn one of these things, go back and hunt for it.

Variables
Variables can hold numbers and strings. There are a few restrictions and rules of thumb to keep in mind when naming variables.

Statements
Statments end in a semicolon.

Strings
Strings are sequences of characters in quotation marks. You can use either type of quote, single or double. There are lots of neat things you can do to manipulate the way a string will print out. And you can use + to concatenate two strings.

document.writeln()
Use document.writeln() to write text and HTML to a Web page.

prompt
You can use prompt to get input from users.

if-then-else
You use if-then-else clauses to make your JavaScript behave differently depending on user actions.

Link events
onClick and onMouseOver inside an href can be used to run bits of JavaScript that react to user actions.

image swaps
By naming images, we can use JavaScript to change what image is displayed.

If you made it through all that stuff, Congratulations! It was a lot to learn. In Lesson 3 we'll be burrowing into the heart of JavaScript: the Document Object Model. We'll also learn about how to open and manipulate windows and frames, and we'll begin building our new browser.