VIRTUAL UNIVERSITY
- JavaScript Gallery -

This page is for posting JavaScript homework assignments from the Virtual University class lead by Tari Akpodiete.

Week 1

    Self-review Questions
  1. What is JavaScript?
    JavaScript is a client-side, object-based scripting language which enables the viewer to interact with the web page.
  2. Who invented JavaScript?
    JavaScript was invented by Netscape in conjunction with Sun Microsystems.
  3. How is JavaScript different from Java?
    JavaScript is interpreted; Java is compiled
    JavaScript is object-based; Java is object-oriented
    JavaScript code is embedded in HTNL; Java is accessed from HTML page
    JavaScript variable data types are not declared; Java variable data types must be declared
    JavaScript has dynamic binding; Java has static binding
  4. What can JavaScript do?
    JavaScript adds functionality, annimation, and interaction to web pages
  5. What can't JavaScript do?
    JavaScript cannot automatically write to hard disc; it cannot access and control someone else's computer
  6. What is ECMAScript?
    A new, standardized scripting language based on JavaScript proposed by the European Community Manufacturer's Association.

Thanks to Zonie who saved my sanity!

Week 2

My first JavaScript program.

Hey! Another JavaScripter is born but it was not easy - more like a Caesarean!

I dutifully copied and pasted the 2 lines with "document.writeln etc." from Lesson 2 and got error messages and no text written until I moved the "br" inside the quotation marks. Of course that was the last alternative to try after putting it ouside the bracket, adding ";" to every line in sight, writing "br" in capitals (JS is case sensitive, I understand), etc. etc. GRRRRRRRRRRRRRR!!!!!!!!!!!!!!
OK, I use Netscape. But it would be nice if the examples would work as they stand. Or is someone doing a PhD in Human Frustration and using me as a guinea pig?
Another Question:I have a book on JavaScript ("The Definitive Guide" from O'Reilly also known as "The Rhino Book") which says "\n" can be used for a line break in JavaScript (also inside the quotes), just like in Perl. This works in "document.write" but NOT in "document.writeln".
WHY NOT????????????
What is the difference between "write" and "writeln"????
Is this another browser problem?
If anyone knows, please enlighten me. E-mail to:
vsherwood@simon-kucher.com


Return to homepage


May, 2000
©copyright 1999 Vicki Sherwood
This page is hypertext http://www.geocities.com/CapeCanaveral/Lab/5373/vujscrpt.html