Do Not Use Reserved Words.

Reserved words are names that the language has put aside for its' own use. These words can not be declared or used as a variable.

Special codes are used to case special

Output Characters Special codes to use

single quote

\'

double quote

\"

backslash

\\

backspace

\b

form feed

\f

new line

\n

carriage return

\r

tab

\t

 

Using Local & global variables with functions:

Variables can be defined as a global or local variable.

  • Global variables can be used anywhere throughout the page and are accessible from anywhere in the program and retain their values until the document is unloaded.If the variable was defined outside of any functions, or loops, or other statements involving brackets, then the variable will be available to the entire page.
  • Local variables, on the other hand, can only be used in the section where they were defined. However, if we first create the variable within a function or any other element with brackets, then everything outside of this function will not have access to it.

Click here for an example

 
Imsg
Discussion

Blogging

E-mail

 

JAVASCRIPT    -    LESSON 3
J s - v a r i a b l e s