Hello. I'm Ryan (obviously), and I write in Javascript. It's a fun, flexible system and I thought you guys should try it.
---Chapter 1---
~~Commands~~
Javascript uses different "commands" that tell different sections to do something. I'll give you a condensed/cut-down version.
document.write() - As the command says, it writes stuff. You can either write a variable(Covered later) or text (Within quotation marks) within the parentheses.
Spoiler: click to toggle
Example: document.write(variable)
Example2: document.write("Hello!")
var - This is used to set a variable (For those of those who skipped Science and Math, it's a type of "object" that can have any meaning) that can be called upon later on.
Spoiler: click to toggle
Example: var variable=Set value here
Example2: var variable=5
Break it down: var signifies that you are typing a variable. variable is the "shortcut" you type that signifies it, then "Set value here" is what the "shortcut" writes/does.
if - This is part of an "If/Then" statement. If you skipped Language Arts, an If/Then statement is like Dominoes. IF you knock down the first domino, THEN the rest will fall down too.
Spoiler: click to toggle
Example: if(variable==5)
document.write(Text here)
Break it down: "If" is the key here. IF "variable" is equal to (==) the number 5, then it will write whatever you put into "Text here"
else - This command is related to the "if" statement. For example, IF variable is equal to (==) 5, document.write(Whatever), but, what if "variable" is NOT equal to (!=) 5? That is where "Else" comes in. It gives a second option.
Spoiler: click to toggle
Example: If(variable==5)
document.write(Whatever)
else
document.write(Whatever2)
Break it down: "else" gives a second option. This second option will write "Whatever2" IF "variable" IS NOT EQUAL TO 5.
---Chapter 2---
~~Syntax~~
Syntax is like Grammar. It is key to the Javascript language. Syntax is what keeps "Else" and "else" apart, just like having "too" and "to" seperate.
{Curly Braces} - These are used to contain command reactions.
Spoiler: click to toggle
Example:
if(variable==5)
{
document.write(Whatever)
}
Break it down: The Curly Braces is what lets the "if" statement know that if it is true, to "release" the command out of the "cage"(Curly Braces).
(Parentheses) - This shows the parameters (the "boundaries" of the command) of what the command is to do.
Spoiler: click to toggle
Example:
if(variable==5)
Break it down: The parentheses lets the "if" statement know what has to be done. Sort of like the "if" statement's To-Do list.
;Semicolon; - Most people prefer to put these at the end of lines, to make it easier to tell where the line starts and ends.
Spoiler: click to toggle
Example:
document.write(Whatever);
Break it down: The semicolon symbolizes the end of a line, sort of like how in morse-code the operators type out "End" to signify the end of the message.
---Sources---
~http://www.tizag.com/javascriptT/
~Various Google Resources
---Thanks to---
~Jubal - For helping me learn Javascript in the first place
~Dimos - For ideas and comments
~Tizag.com - For making that site in the first place and supplying precious knowledge
~~Corrections appreciated~~
Second tutorial to come soon.