Back to the beginning

admin

Administrator
Staff member
hmm...

A triumphant day occured yesterday. I was able to put all the tiny little scripts (working individualy) into the mother of all scripts I've ever made, and when I tried it out, it didn't work.

That makes me very very sad. :(:(:(


Anyway, my main problem seems to be variables in general.

So, I'm going to put down what I know about variables and would like people to just tell what they know about variables if I already don't have it down.

Here goes:

?Variables set outside of a function are automatically global (Not 100% on that one).

?Variables set within a function have the following attributes.
- If using (var) in front of the variable then it is local
and only accessable via THAT function.
- If not using a (var) in front of the variable then it
becomes global and is able to be used by other
functions.

?Setting a variable is done by using the var "Varable name".
?Variable Names can only contain Letters, Numbers, and
Underscores
?The variables Dog, DOG, dog, DoG, dOg, DOg, dOG are all
different variables.
?You call variables by placing their name within a JavaScript.
?You can only send variables between pages using forms or
cookies.
?Global Variables are set for the Entire Script.
?Local Variables are used for only that script.

That is basically the basics of variables, now I want some more info about variables.

How are they transferred.
Are they usable both between functions and non-functions
How do they replace one another.
Just ANYTHING!!

Any and All Help is appreciated.
Thanks.
 
Back
Top