亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript scope

JavaScript Scope

A collection of scope accessible variables.

JavaScript scope

In JavaScript, objects and functions are also variables.

In JavaScript, scope is a collection of accessible variables, objects, and functions.

JavaScript function scope: The scope is modified within the function.

JavaScript local scope

Variables are declared within the function, and the variables are local scope.

Local variables: can only be accessed inside the function.

  局部變量在聲明的函數(shù)內(nèi)可以訪問。myFunction();
document.getElementById("demo").innerHTML =
"我的名字叫 " +  typeof Name;
function myFunction() 
{
    var Name = "jack";
}
Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>局部變量在聲明的函數(shù)內(nèi)可以訪問。</p> <p id="demo"></p> <script> myFunction(); document.getElementById("demo").innerHTML = "我的名字叫 " + typeof Name; function myFunction() { var Name = "jack"; } </script> </body> </html>
submitReset Code