Variables in JavaScript

Variables are simply the name of the storage location. There are two ways we define variables more precisely they are known as the scope of the variable. Scope determines the accessibility (visibility) of these variables. they are:- local variable and global variable.

When variables are defined inside a function then they cannot be used outside of it, these types of variables are called local variables, and when variables are declared outside the function then we can use them anywhere these are global variables.

abhishek k
Tagged : / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] Get to know about JavaScript variables and their uses then Click here […]

1
0
Would love your thoughts, please comment.x
()
x