<!-- <!DOCTYPE html> -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var a = 10, b = 20;
function show(){
var b =100;
a += 5;
alert(a + ","+ b);
}
show();
alert(a + ","+ b);
</script>
</head>
<body>
</body>
</html>
<!-- <!DOCTYPE html> -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var a = 10, b = 20;
function show(a){
var b =100;
a += 5;
alert(a + ","+ b);
}
show(a);
alert(a + ","+ b);
</script>
</head>
<body>
</body>
</html>
上面两段代码为什么第一段代码show是(15,100);alert(15,20)
第二段代码show是(15,100);alert(10,20)?
谁能详细解释一下,完全懵逼