<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
<script>
//变量声明提升
function test() {
var a = "1";
var f = function(){};
var b = "2";
var c = "3";
}
//上述代码等价于
function test() {
var a,f,b,c;
a = "1";
f = function(){};
b = "2";
c = "3";
}
</script>
变量和函数声明提升
最新推荐文章于 2023-01-29 23:03:50 发布