Javascript

Topic: JS Functions

What is a Local JavaScript Variables?

A variable declared (using var) within a JavaScript function becomes LOCAL and can only be accessed from within that function. (the variable has local scope).You can have local variables with the same name in different functions, because local variables are only recognized by the function in which they are declared.Local variables are deleted as soon as the function is completed.

Browse random answers: