This page is for posting JavaScript homework assignments from the Virtual University class lead by Tari Akpodiete.
Thanks to Zonie who saved my sanity!
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