Difference between revisions of "Getting Started"

From CodeStuff
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
Here is a simple one line program.
 
Here is a simple one line program.
 
 
<edcode name="first">  
 
<edcode name="first">  
 
  print("hi there");  
 
  print("hi there");  
Line 18: Line 17:
 
; ;
 
; ;
 
: a semicolon indicating the end of that part of code.
 
: a semicolon indicating the end of that part of code.
 +
  
 
----
 
----
  
This is a slightly longer program.
 
  
 +
This is a slightly longer program.
 
<edcode name="second">  
 
<edcode name="second">  
 
  print("hello");  
 
  print("hello");  
Line 28: Line 28:
 
  print("somewhere else",300,200);  
 
  print("somewhere else",300,200);  
 
</edcode>
 
</edcode>
 +
 +
Here three commands are issued, one after the other.    The last line uses an additional two parameters.  These extra parameters say where to place the printed text.
 +
The text "somewhere else" appears 300 pixels from the left and 200 pixels from the top.
 +
 +
 +
----
 +
 +
===What next?===
 +
[[Introduction to Terminology]]

Latest revision as of 10:38, 24 January 2012

Here is a simple one line program.


It has these parts.

print
The name of the function to perform. JavaScript is case sensitive so print is considered a different name to Print
( ... )
brackets surrounding the parameters for the print function
" ... "
Quote marks surrounding some text characters
hi there
The text characters themselves
 ;
a semicolon indicating the end of that part of code.




This is a slightly longer program.

Here three commands are issued, one after the other. The last line uses an additional two parameters. These extra parameters say where to place the printed text. The text "somewhere else" appears 300 pixels from the left and 200 pixels from the top.



What next?[edit]

Introduction to Terminology