JavaScript syntax: Difference between revisions

Content deleted Content added
No edit summary
rv vandalism
Line 8:
[[Variable]]s in standard JavaScript have no type attached, and any value can be stored in any variable. Variables can be declared with a <code>var</code> statement. These variables are [[Variable#Scope_and_extent|lexically scoped]] and once a variable is declared, it may be accessed anywhere inside the function where it is declared. Variables declared outside any function, and variables used without being declared with 'var', are global (can be used by the entire program).
 
Here is an example of variable Ádeclarationsdeclarations and global values:
 
<code>