View Single Post
Old 07-15-2011, 02:10 AM   PM User | #6
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,063 Times in 4,032 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
You are confusing JAVA and JavaSCRIPT.

*LOOK* at the error message you are getting:

Code:
story.java:1: class, interface, or enum expected
var it = 0;
^
That is a JAVA error.

You can't use the keyword var in Java. You can't use document.write in Java.

MAKE UP YOUR MIND: Are you trying to write a Java program or a JavaScript program???

If it's JavaScript, then you can *NOT* try to send the code through a JAVA compiler.
Old Pedant is offline   Reply With Quote