www.crosswinds.net/~fishcaro/day_J1_intro_to_javascript.htm
The lessons on JavaScript have been prepared using information from:
In particular, the information for today's lesson comes primarily from pages 1 through 23 in this book.
INDEX CARD #J1:
WHAT IS JAVASCRIPT? (J1a)What is a scripting language? A script is a list of commands that can be executed without user interaction. A scripting language is a simple programming language to write scripts. Supposedly, scripting languages are "programming languages for non-programmers." It is true that non-programmers can use JavaScript for cookbook-style tasks; however, to call JavaScript a "scripting language" is a disservice. It is a full-featured programming language! What does object-oriented mean? The term object-oriented describes a system that deals primarily with different types of objects, and where the actions you can take depend on what type of object you are manipulating.
|
VERSIONS OF JAVASCRIPT (J1b)Is JavaScript evolving? Absolutely. These lessons document JavaScript 1.2 . What is JScript? Netscape invented JavaScript, and the name JavaScript is owned by Netscape. Microsoft's implementation of the language is called JScript. Versions of JavaScript and JScript are more or less compatible. Are Java and JavaScript the same thing? NO. Java is a programming language from Sun Microsystems. Originally, JavaScript was called LiveScript; its name was changed at the last minute as a marketing ploy. Are there other programming languages that can be embedded within a web browser? Yes. For example, VBScript is a variant of Microsoft's Visual Basic language which has many of the same features as JavaScript, but can only be used with Microsoft browsers. |
Things you CAN do with JavaScript (J1c)
|
Things you CAN'T do with JavaScript (J1d)
|
A SIMPLE JAVASCRIPT PROGRAM (J1e)NOTE: In mathematics, 5! is read as "five factorial" and is defined by <HTML> <BODY> <SCRIPT LANGUAGE="JavaScript"> document.write("<H2>Table of Factorials</H2>"); for(i=1, fact=1; i<10; i++, fact*=i) { document.write(i + "! = " + fact); document.write("<BR>"); } </SCRIPT> </BODY> </HTML> |
Output from the Factorial Program (J1f) |
Printable version of Index Card J1a
Printable version of Index Card J1b
Printable version of Index Card J1c
Printable version of Index Card J1d
Printable version of Index Card J1e
Printable version of Index Card J1f
WORKSHEET #J1:
ASSIGNMENT #J1: