• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

var

JavaScript 1.0, JScript 1.0, ECMAScript 1.0 NES2+, Nav2+, IE3+, Opera3+ Syntax

var variable
var variable = value
						

Description

The var keyword is used to declare variables within a script. If it is used in a function, the scope of the variable is confined to that function. If used outside of a function, it is not limited and can be accessed anywhere on the page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint