标签:log === UNC 局部变量 == 函数 javascrip pre 报错
var num = 10
function func() {
var num1 =20
num =20
console.log("num1 ="+ num1)
}
func()
console.log ("num = "+ num)
============================
function func (){
var num = 20
p =30
console.log(p)
}
func()
//报错p是局部变量
console.log(P)
标签:log === UNC 局部变量 == 函数 javascrip pre 报错
原文地址:https://www.cnblogs.com/jeco-li/p/10116897.html